I think this actually works - BUT the <umbraco:Item /> overwrites my title. When i use the following code in my MasterPageTemplate the above code does work:
<head runat="server> <title></title> </head>
What I want is to add the <umbraco:Item /> to my existing Title (wish is added by my UserControl first), exampel "My Page Title, *pageName* - *siteName*". How do I do this?
Append text to title
I'm trying to add some extra text to the title for some of my pages using a .NET UserControl.
My template structure looks like this:
MasterpageTemplate
PageTemplate
My MasterpageTemplate has this code for setting the page Title:
I use this to change the title in my UserControl:
I think this actually works - BUT the <umbraco:Item /> overwrites my title. When i use the following code in my MasterPageTemplate the above code does work:
What I want is to add the <umbraco:Item /> to my existing Title (wish is added by my UserControl first), exampel "My Page Title, *pageName* - *siteName*".
How do I do this?
You can read the umbraco values directly in your user control using the API or uQuery.
Then you could just do (pseudo code)
Rich
Sounds like what I'm looking for. Do you have any example or documentation I can read about reading umbraco values?
Hi,
Some documentation here http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-the-nodefactory
Or the Umbraco TV API video is good too.
You can also use uComponents uQuery http://ucomponents.codeplex.com/wikipage?title=uQuery
Rich
Great, thank you very much Rich!
is working on a reply...