How to return True if current page is being rendered

Permalink
I'm trying to get the template to add class names into areas by checking if the page is currently being rendered.

Trying to keep the code nice and clean so ideally just need a function which will return true if the page is current - i.e. isCurrentPage() sort of thing - can anybody advise?

 
glockops replied on at Permalink Reply
glockops
A theme template? A block custom template?

I used this in my page types:
<body class="<?=$c->getCollectionTypeHandle()?>">


If my page type handles all start with something like "dept" (dept_full, dept_1column, etc) then I can use CSS like this:
/* CSS */
[class^="dept"] .navigation {background: #7B7F84;}


You could ask for something other than page type handle - like collectionID and cascade styles in that manner. See this thread:http://www.concrete5.org/community/forums/customizing_c5/changing-c...

Hope that helps.