Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ron Brouwer 273 posts 768 karma points
    Feb 25, 2010 @ 19:19
    Ron Brouwer
    0

    Hi,

    Why would you go through all that trouble?

    You can use:

    <body id="node<umbraco:Item field='pageID' runat='server'></umbraco:Item>" class="blabla">

    Ron

  • Heather Floyd 557 posts 826 karma points MVP 3x c-trib
    Feb 26, 2010 @ 19:54
    Heather Floyd
    0

    Hi Ron,

    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.

    Heather

  • Ron Brouwer 273 posts 768 karma points
    Feb 27, 2010 @ 09:17
    Ron Brouwer
    0

    Hi Heather,

    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.

    Ron

  • Heather Floyd 557 posts 826 karma points MVP 3x c-trib
    Feb 28, 2010 @ 05:42
    Heather Floyd
    0

    Thanks for the tip about the single quotes vs. double-quotes. I will keep that in mind.

    ~Heather

Please Sign in or register to post replies

Write your reply to:

Draft