Jump to content
E-Luminate

Generate a dynamic body ID?

Recommended Posts

Hi,

I'm running CubeCart 6.18 and am wondering if it's possible for each page to dynamically change/add a <body> ID tag?

I wanted to have this available so that I can use specific content or styling dependent on the body id.

Thanks,

Neil

Share this post


Link to post
Share on other sites

Dynamic, but not random?

Will this be for the purpose of identifying specific categories, documents, and/or products?

If Documents, CubeCart allows for template rendering code (Smarty) including testing for the doc_id and if/else structures.

Such tests can also be accomplished in two or three other ways - always using the doc_id, prod_id or cat_id.

All pages have a div with a class of {$page-name}_wrapper where {$page-name} can be tested and if/else code blocks be used.

If you need a different use-case, a code snippet can be written. The code snippet can be used to send a calculated string to the template rendering engine, and then the engine can construct the HTML accordingly.

What are the particulars of your needs?

Edited by bsmither

Share this post


Link to post
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.

Guest
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...