Guest coopersita Posted April 9, 2012 Share Posted April 9, 2012 In the old templating system, there used to be a template tag {BODY_VAL} for adding a class or id to the body tag: <body id="{BODY_VAL}">, but that tag doesn't work anymore (I tried {$BODY_VAL}, but nothing). Is there a new tag for that? I need it to style my site properly. Thanks. Quote Link to comment Share on other sites More sharing options...
Robsta Posted April 9, 2012 Share Posted April 9, 2012 You can use any name. Quote Link to comment Share on other sites More sharing options...
Guest coopersita Posted April 12, 2012 Share Posted April 12, 2012 What do you mean any name? I need it to be descriptive of the page I'm currently in, like <body class="about"> or <body class="home">, therefore, it's a dynamic value. Is there a template tag that gives a sanitized, html friendly document name? Quote Link to comment Share on other sites More sharing options...
Guest coopersita Posted April 23, 2012 Share Posted April 23, 2012 In case anyone needs this, I found that this works: <body id={if $SECTION_NAME == 'product'} "{$SECTION_NAME}_{$PRODUCT.product_id}" {elseif $SECTION_NAME == 'category'} "{$SECTION_NAME}_{$CATEGORY.cat_id}" {elseif $SECTION_NAME == 'document'} "{$SECTION_NAME}_{$DOCUMENT.doc_id}" {else}"home"{/if} > Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.