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
Why would you go through all that trouble?
You can use:
<body id="node<umbraco:Item field='pageID' runat='server'></umbraco:Item>" class="blabla">
I din't know inserting a macro into a template was a lot of trouble. ;-)
The main thing I wanted was to be able to get the template name as a class, which you can't access via umbraco:item. Also, sometimes I have experienced issues with inserting things into html tags, so it was just simpler for me to do it all in one shot.
It's true that the item normaly can't go into a tag.The only thing is to replace " for ' then it works fine.
I thought that the @template worked but it returns an id.Another posibility is to use a placeholder and set the class in each template.
But the problem is already solved, so thanks for sharing.
Thanks for the tip about the single quotes vs. double-quotes. I will keep that in mind.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted