This was working all well and good until I had to add a run at server to the head because I added a ajax calendar extender to a page, now as many people have pointed out any macro or pagefield put in the head when runat server is on there it renders as plain text.
As I said lots of people have this problem but I cannot determine the solution from the posts.. Is there an available solution out there that I am missing or is it just something I can't do?
Think there is issue logged on codeplex as it looks like something needs to change in the core. I ended up using jquery ui calendar instead of ajax one.
Which appears to be having the same problem and it says
"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 :)" (the post by Simon Justesen)
But I have no clue what this means? Unless this isn't the same problem? It's going to be rather annoying if I have to change the way it works!
Well I have found a work around for my particular problem.. but by no means a fix.. I have stuck the stylesheet line in the body and it still works.. not a good way of doing it.. but works.
I tried puttinga macro in the head of the master page that had runat server but it stil rendered as plain text. I have not tried in the master teplate though.
head with runat server and page field - can't find solution on here?
Hi!
Our website is using a pagefield to determine the css file that a page uses, by using the following line:
This was working all well and good until I had to add a run at server to the head because I added a ajax calendar extender to a page, now as many people have pointed out any macro or pagefield put in the head when runat server is on there it renders as plain text.
As I said lots of people have this problem but I cannot determine the solution from the posts..
Is there an available solution out there that I am missing or is it just something I can't do?
Bex
Bex,
Think there is issue logged on codeplex as it looks like something needs to change in the core. I ended up using jquery ui calendar instead of ajax one.
Regards
Ismail
I found this post:
http://our.umbraco.org/forum/templating/templates-and-document-types/3278-Combining-static-text-and-page-field-in-title
Which appears to be having the same problem and it says
"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 :)" (the post by Simon Justesen)
But I have no clue what this means? Unless this isn't the same problem?
It's going to be rather annoying if I have to change the way it works!
Well I have found a work around for my particular problem.. but by no means a fix..
I have stuck the stylesheet line in the body and it still works.. not a good way of doing it.. but works.
To overcome a similar problem, I was outputing the meta description field, I created a macro that output the complete line, in your case
And then called the macro in the master template. This was with runat="server" on the head tag.
I tried puttinga macro in the head of the master page that had runat server but it stil rendered as plain text.
I have not tried in the master teplate though.
Our Master template looks like:
is working on a reply...