Almost every object defined in Umbraco has a name and an alias. I'm wondering why do we need these two properties? Why not just use the name to identify the object?
When building large sites it means you can define a naming architecture which the editor does not have to see. We use a system where we prefix the type of stored data which its relation. This means across the site we can reuse properties, which makes writing/reusing macro's easier.
Generic objects which would get reused across the site;
contentBody
contentTeaser
contentHeader
mediaRelation (used for relating content to media)
contentRelation (vice versa)
Area specific types;
albumName
albumRelease
eventDate
Working like this allows a programmer to list out the objects quickly in a nicely ordered list of relations! Which saves having to search through all the properties just to find if you called the object HeaderSub or SubHeader.
Hope thats useful! Umbraco is just really a framework, use it as you wish!
Why do we need both of Name and Alias?
Almost every object defined in Umbraco has a name and an alias. I'm wondering why do we need these two properties? Why not just use the name to identify the object?
Hope to hear from all of you!
Nam.
Hi Nam,
"Name" is for the human-friendly display names of objects, "Alias" is for programmer-friendly names, where spaces and symbols are not recommended etc.
Hope this helps.
Benjamin
Name - for the editor.
Alias - for the programmer.
-
When building large sites it means you can define a naming architecture which the editor does not have to see. We use a system where we prefix the type of stored data which its relation. This means across the site we can reuse properties, which makes writing/reusing macro's easier.
Generic objects which would get reused across the site;
is working on a reply...