Closed (fixed)
Project:
Zen
Version:
6.x-1.1
Component:
CSS/HTML Markup
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Nov 2009 at 03:39 UTC
Updated:
29 Jul 2010 at 15:40 UTC
I noticed that the node-type class is used in the body class and then it is used again further down inside the #content-area id div.
This kind of bugged me as I would like these classes to be more unique. How would I go about changing the first node-type- class into page-class-?
Becky
Comments
Comment #1
beckyjohnson commentedThis is what I have so far:
$vars['body_classes'] = str_replace('node-type-', 'page-type-', $vars['body_classes']);}Becky
Comment #2
echoz commentedYou are correct except you have the closing bracket without the opening one of the preprocess_page function -
Incidentally, I brought this up a while ago (http://drupal.org/node/320365) and JohnAlbin informed us that it is core that provides that body class, and zen provides the class on the node div.
Comment #3
beckyjohnson commentedOh that's really interesting echoz. Thanks for correcting my code. That makes more sense...
Becky
Comment #4
dadderley commentedThanks,
I use the themer module which writes in token based body classes as well as clases base on the path.
I wound up with a duplicate of the "front" body class which is not that good.
I used your code like this:
The class "front" becomes class "frontpage" .
Comment #5
akalata commented