By skorch on
I'm running Drupal 4.5. I'd really like to have visual seperation between the different document types. I'd like the display style for a forum to be different from a story. Has anyone tried this? Is it possible with the current version?
Comments
Pretty easy fix
You can do this via css and slightly editing the theme you're using. Find the function themename_node($node, $main=0, $page=0). Most the the themes place each node in their own div. For instance, my theme generates the node with this code:
The line
$output = "<div class=\"node node_$node->type\">\n";defines the div class of the node. Find this line and in the class quotes add node_$node->type, as it shows in my function above.Then you can add different styles to each node type by having the css classes such as:
.node_blog { color: red; }Hope the helps!
That's awesome. Thanks for t
That's awesome. Thanks for the info.
Also
You can also make parts of the page outside just the node display be different depending on the node type. Because
theme('node', ...)gets called beforetheme('page', ...), you can record the node type for later use. For instance: