Rank: Devotee
Joined: 10/30/2007 Posts: 95 Location: Israel
|
Hi all,
I'm trying to find a way to add to a page title (retrieve, concat, and replace with existing) from a .NET user control. In my installation we have different pages, some of them contain user controls that display data. For SEO reasons, we would like to be able to use the info we load in those controls to set the title of the containing page. I could use an XSLT extension, but I'm trying to find a way that will relieve the need for an extra external .NET call.
I tried accessing Me.Page.Header.Title (in our VB.NET UC) in Page_Load of the UC but with no luck; anyone has a better idea?
Itamar.
|
 Rank: Aficionado
Joined: 6/5/2008 Posts: 148 Location: United Kingdom
|
in umbraco v4 i think you can use <head runat="server"/> Then you can use code, Page.Header.Title="whatever" Alternatively you could use master templates: Put a content place holder inside the head tag?
Adam Perry ( blog, twitter), developing Umbraco based websites and applications for ConnectDigital.
|
Rank: Devotee
Joined: 10/30/2007 Posts: 95 Location: Israel
|
Those are v4 methods; any simpler way I could use with v3.x? What I had in mind was an XSLT macro (which will also get cached, thats a plus) in the page title, and pass it some sort of parameter to indicate which page I'm loading. If no better ideas come through, I might just do that...
Anyone?
Itamar.
|