Creating body ID based on pagetype?
Permalink
Hi,
Is it possible to insert the page type into the body tag based on the active page type being used?
As with the default theme, I've added the top of my template file as an include in elements/header.php, so I suppose one way to do it would be to move the body tag into all my template files, but I'd prefer to keep things clean and just include some php code like 'if active_page_type { echo active_page_type }'
Any ideas? This would give a lot of flexibility in terms of CSS.
Thanks
Is it possible to insert the page type into the body tag based on the active page type being used?
As with the default theme, I've added the top of my template file as an include in elements/header.php, so I suppose one way to do it would be to move the body tag into all my template files, but I'd prefer to keep things clean and just include some php code like 'if active_page_type { echo active_page_type }'
Any ideas? This would give a lot of flexibility in terms of CSS.
Thanks
<?= $c->getCollectionTypeHandle(); ?> <?= $c->getCollectionTypeID(); ?> <?= $c->getCollectionTypeName(); ?>
...are a legend.
Thanks for your help!
Thanks for your help!
Thanks a lot!
I will playin around with 'header include' but offcource that will insert a body id into the header tag which wil make messy html.
This works like a charme.
I will playin around with 'header include' but offcource that will insert a body id into the header tag which wil make messy html.
This works like a charme.
Would be great to know if possible, could be super useful in terms of CSS.
Thanks