Might be useful to add body css classes based on page types

Permalink 3 users found helpful
I see $c is a global object in all templates that shows the current page collection.

Sometimes for some css juggling it comes very handy to have the page type available as a body css class. Here's the code I deciphered from the Page class/model:

<body class="<?php echo $c->getCollectionTypeHandle()?>">


It adds the page type handle as a class. Very useful.

Tags:

, cheat sheet
View Replies:
PauloCarvalhoDesign replied on at Permalink Reply
PauloCarvalhoDesign
Hello,
You can find all of that and more at:
http://www.concrete5.org/documentation/introduction/cheat-sheet/...