Jump to content

Body Class of ID (alternative to {BODY_VAL} )

Guest coopersita

Recommended Posts

Guest coopersita

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.


Link to comment
Share on other sites

Guest coopersita

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?

Link to comment
Share on other sites

  • 2 weeks later...
Guest coopersita

In case anyone needs this, I found that this works:

<body id={if $SECTION_NAME == 'product'}


	  {elseif $SECTION_NAME == 'category'}


	  {elseif $SECTION_NAME == 'document'}




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...