Hi folks, this is something I used successfully in v3 but can't seem to get to work in v4. I am using v4.0.2.1 and have inserted the following in my <head runat="server"> section:
Unfortunately it seems to only display the pageName but completely ignored the static text after it. Has anyone else encountered this? I've probably missed something simple and fundamental here but can't think of what that may be!
Ah! Perfect! That did it thanks :o) At the moment I don't need runat="server" in the <head> - will wrap it in a macro when it becomes necessary. Thanks again...
Combining static text and page field in <title>
Hi folks, this is something I used successfully in v3 but can't seem to get to work in v4. I am using v4.0.2.1 and have inserted the following in my <head runat="server"> section:
<title><umbraco:Item field="pageName" runat="server"></umbraco:Item> - Savitar Bernese Mountain Dogs - New Zealand</title>
Unfortunately it seems to only display the pageName but completely ignored the static text after it. Has anyone else encountered this? I've probably missed something simple and fundamental here but can't think of what that may be!
Any suggestions would be greatly appreciated.
Thanks,
Dany.
If you remove runat="server" from your <head>-tag it should be working correctly
If you need to have runat="server" at the <head>-tag, I think you need to put everything inside fx. a xslt-macro as a workaround :)
Ah! Perfect! That did it thanks :o) At the moment I don't need runat="server" in the <head> - will wrap it in a macro when it becomes necessary. Thanks again...
Easest way to do it inside a <head runat="server"> would be:
<umbraco:Item Field="pageName" insertTextAfter=" - Savitar Bernese Mountain Dogs - New Zealand" runat="server" />
Thanks Rick, that's good too but I've wrapped it in a macro to make it more configurable for SEO
is working on a reply...