Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I have this weird problem. For a package (Language Selector) to work properly, I need to add the runat=server attribute in the head-tag
But when I do that, the spaces and hyphen between the dynamic values are gone. This markup:
<title><umbraco:Item field="siteName" recursive="true" runat="server" /> - <umbraco:Item field="pageTitle" runat="server" recursive="true" /></title>
renders like this:
siteNamepageTitle (e.g FlexisleHomepage)
while it should be siteName - pageTitle (e.g Flexisle - Homepage)
If I remove the runat=server attribute from the head-tag the <title> tag renders normally: siteName - pageName
Does anyone has a clue what's going on?
Thanks for your help,
Anthony
Create a HeadTitle macro... it will also clean up your template.
You could also do this:
<title><umbraco:Item field="siteName" insertTextAfter=" - " recursive="true" runat="server" /><umbraco:Item field="pageTitle" runat="server" recursive="true" /></title>
Hi Daniel,
Thanks a lot, I inserted the insertTextAfter=" - " attribute and this solved the problem:
www.flexisle.com
greetings,
Umbraco is a beautiful (and flexable) thing... love it..
Glad I could help.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
no spaces in title tag
Hi,
I have this weird problem. For a package (Language Selector) to work properly, I need to add the runat=server attribute in the head-tag
But when I do that, the spaces and hyphen between the dynamic values are gone. This markup:
<title><umbraco:Item field="siteName" recursive="true" runat="server" /> - <umbraco:Item field="pageTitle" runat="server" recursive="true" /></title>
renders like this:
siteNamepageTitle (e.g FlexisleHomepage)
while it should be siteName - pageTitle (e.g Flexisle - Homepage)
If I remove the runat=server attribute from the head-tag the <title> tag renders normally: siteName - pageName
Does anyone has a clue what's going on?
Thanks for your help,
Anthony
Create a HeadTitle macro... it will also clean up your template.
You could also do this:
<title><umbraco:Item field="siteName" insertTextAfter=" - " recursive="true" runat="server" /><umbraco:Item field="pageTitle" runat="server" recursive="true" /></title>
Hi Daniel,
Thanks a lot, I inserted the insertTextAfter=" - " attribute and this solved the problem:
www.flexisle.com
greetings,
Anthony
Umbraco is a beautiful (and flexable) thing... love it..
Glad I could help.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion