Qite / Umbraco-Inception

A code first approach for Umbraco (7)
MIT License
26 stars 9 forks source link

Implicit Aliases for Attributes #7

Open sunshine-attack opened 10 years ago

sunshine-attack commented 10 years ago

Purpose: Eliminate redundant entries of aliases that are derivatives of the names in the attributes.

Would it be possible to add a feature to Attributes with an Alias to automatically convert the Name property of the attribute to the Alias.

I've set something up similarly through inheritance but was thinking it might be a feature the core project should have.

Example code to include in constructor of Attributes:

ContentTypeAlias = contentTypeName.ToSafeAlias(false);
Alias = namename.ToSafeAlias(true);
nojaf commented 10 years ago

So you would like an overload of those constructors? Not a bad idea, but it's kinda bussy at the office. Would you mind making a pull request yourself?