Tuesday, February 19, 2008

Display Names

Display names provide an alternate name for content items when they are rendered in the Content Editor or the item editor (in WebEdit mode). In the following example, Home has a display name of “Sitecore.net”:


There are a number of scenarios where this feature may be useful. Sometimes, the name of a content item is insufficiently descriptive for developer- or business-user ease-of-use. For example, the standard Sitecore installation comes with an item called “Home.” To enhance the user interface experience, you may want to rename the Home item to something else. It is easy to rename an item; however, if you have already created dependencies on the Home item, renaming may cause problems if performed late in a project. (See also “Deleting or Renaming the Home Item,” the subject of a future blog post.)


In other situations, you may want to create an item with an illegal character (such as an exclamation mark). While the item name must not include illegal characters (as this would interfere with the processing of http requests), the Display Name can include characters that are not allowed in item names.


To set the display name for a content item, navigate to the item in the Content Editor and click the Display Name command in the Rename chunk:


3 comments:

Alex Shyba said...

Also, I use the display name for my XSL renderings such as menus to retrieve alternative item name. Very useful!

Thomas Eldblom said...

Then you think: "Hey, can't I use this to give user-friendly names to my masters, so I won't end up with 'New __Node'?".

Well, no, Sitecore chooses to copy the display name from the master to all the items created from it. Not exactly the result you would like.

Alex Shyba said...

Hi Thomas,

Well, only the system masters are named with double underscore, so I would not touch the system masters.
The behavior you have described is completely expected.