Just thought, would it be a good idea to have a forum around design principles and/or best practices?
Im aware this could be covered in the using umbraco forum, however the question im wanting to ask doesnt fit in there.The question itself is "is it a good idea to allow users a seperate property for the title page, or to just use the @pagename reference?"
Perhaps another section might be helpful for such questions about requesting guidance/advice.
To your specific question... I try to use the pagename/@nodeName if possible but some designs/clients just don't make that reasonable. If they want a reeeeeeeeaaaalllllly long page title that's lousy for urls, for instance. In those cases I create a 'pageTitle' property and in my xslt's I check to see if string(data[@alias='pageTitle']) != '' and use the pageTitle if set and the @nodeName if the pageTitle is empty.
I've even had the situation in which the @nodeName was used to specify the url, a 'pageTitle' was used to display the <title> in the <head> and as the <h1> on the page template, and a 'navText' field was used to specify how the page should be listed in the navigation. Again, in the xslt's I would check for the navText, pageTitle, and @nodeName and fall back as appropriate if the more specific field were left empty (as it often was in practice).
I actually created another post on the UI section as i thought it would fit in there better. But the advice you have given is just what i was looking for!
New Forum?
Hey all,
Just thought, would it be a good idea to have a forum around design principles and/or best practices?
Im aware this could be covered in the using umbraco forum, however the question im wanting to ask doesnt fit in there.The question itself is "is it a good idea to allow users a seperate property for the title page, or to just use the @pagename reference?"
just an idea
Alec
Perhaps another section might be helpful for such questions about requesting guidance/advice.
To your specific question... I try to use the pagename/@nodeName if possible but some designs/clients just don't make that reasonable. If they want a reeeeeeeeaaaalllllly long page title that's lousy for urls, for instance. In those cases I create a 'pageTitle' property and in my xslt's I check to see if string(data[@alias='pageTitle']) != '' and use the pageTitle if set and the @nodeName if the pageTitle is empty.
I've even had the situation in which the @nodeName was used to specify the url, a 'pageTitle' was used to display the <title> in the <head> and as the <h1> on the page template, and a 'navText' field was used to specify how the page should be listed in the navigation. Again, in the xslt's I would check for the navText, pageTitle, and @nodeName and fall back as appropriate if the more specific field were left empty (as it often was in practice).
Does that help?
cheers,
doug.
Thanks Doug
I actually created another post on the UI section as i thought it would fit in there better. But the advice you have given is just what i was looking for!
Cheers,
Alec
is working on a reply...