By oneoftwo on
Hi,
I'm currently looking for a module that can help me with the following (I'm running 4.7.6):
On my frontpage there's a lot of "news"-items. I want to be able to specially highlight those items that belong to certain categories (e.g. category "Culture" with a blue heading instead of my standard grey, or a red borderline around the item).
Any suggestions?
Help is very much appreciated!
Comments
I think one way you could do
I think one way you could do it is edit or create a template.php file (if you're using the phptemplate engine) and add a _node theme engine hook like:
my_theme_name_node($node, $teaser, $page() { ...
Then in that function you can access the $node->taxonomy property of the $node object to see if it belongs to a certain category and then assign the appropriate css class to it if it does.
http://api.drupal.org/api/4.7/function/theme_node