random0xff
-
5/31/2009 4:15:19 PM
Is there a way to do this easier?
<title><%= CMSContext.CurrentDocument.DocumentName == String.Empty ? CMS.SettingsProvider.SettingsKeyProvider.GetValue(String.Format("{0}.CMSPageTitlePrefix", CMSContext.CurrentSiteName)) : CMSContext.CurrentTitle%></title>
Does that code make you dizzy? I know! On the homepage I don't want to have "site - title", just "site", but on all the other pages I want "site - title". I want to set the title on ONE masterpage, like above. It checks to see if document name is empty, then it takes a loooong way to get the setting. Otherwise it uses the quick way to get the title with the macro already resolved (nice!).
But that code is quite dense, isn't there a simple macro for this?
PS. For the root node, I can't set the "Document name" property. Why not? Also, I can't set the Page title, unless I first create a 'tag group', why?! It has nothing to do with tag groups... :-(
|