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
Any suggestions will be much appreciated :-)
Why are you so keen to avoid that runat server tag?! Perhaps there might be a way round what it's breaking?
I can see a disadvantage in having the runat server on the head-tag if we are using a macro to generate the different meta tags including the title-tag. I always use a XSLT macro to create the meta-tags and the title tag in my head, so that I can have some different fallback, and the admins can have some different opportunities. But the problem is, that if I have the runat server on my head-tag and there is no title-tag in the template, then the runat server will create an empty title-tag like this:
When my page is rendered then, I'm suddently having two title-tags in my head-tag, and one of them will even be empty. And we all know that two title-tags in the head-tag will not work at all.
Just my five cents :)
Hi Tom, I also use a "header" macro to fill out metatags etc exactly as Kim does. And the reason i want to avoid the runat="server" attribute on the <head> tag is the same. I dont want two <title> tags in my header. So if there is a way to supress the empty title tag i would not mind having the runat="server" attribute on my <head> tag. Not sure if that is possible though ?
Any ideas will be much appreciated :-)
Like Tentonipete is demonstrating in his post here: http://our.umbraco.org/forum/templating/templates-and-document-types/16193-css-for-templates-%28not-master%29
Hi Jan, That actually sounds like a possible solution to the problem, thanks for your input :-)
That's great. I'm actually a bit stunned that I have never thought of this option myself before. But it's definately something I'll play around with. I'm thinking it should be possible to use in conjunction with the clientdependency framework somehow.
Ahhhh! I see where you're coming from, I only ever tend to do things like;
<umbraco:Item insertTextBefore="<meta name="keywords" content="" field='globalKeywords' recursive='true' runat='server'></umbraco:Item><umbraco:Item insertTextBefore=" " field='metaKeywords' insertTextAfter=""/>" runat='server'></umbraco:Item>
So authors have to put their meta in manually. Haven't looked into generating meta tags with a macro before. Sounds handy! Will definitely have a read up :)
Actually, the way I described is quite nifty, as the users always have the full access to how the meta tags will look - If they want to :)
If the users are lazy and doesn't take the time to write some unique titles, descriptions etc., the macro will generate some fairly unique and descriptive content to be put in the meta tags.
So if the users want to, they have the full access to how the content of the tags looks like, and even if they don't take the time, the titles etc. will still be quite good and unique for the search engines :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted