I've a bunch of news items on my frontpage. I want to use taxonomy image to visually aid the visitor to see to which category a news item belongs. Preferably I would only want to show the taxonomy image on the front page and not on the page of the news item itself. Is it possible to do this.
Ideally, I would like to use functionality similar to what is provided for blocks and views, i.e. provide a list of pages on which (not) to show the image or a php-block which returns a boolean.

Comments

nevets’s picture

Restricting to the front page is straightfoward. I am guessing you have added the approriate code to display the image in node.tpl.php. In this case you can something like this

<?php
if ( $is_front ) {
   // Code to display image
}
?>

The variable $is_front is true when the node is being displayed on the front page of the site. A more general solution (i.e. provide a list of pages on which (not) to show the image) would be more involved.

pvanderspek’s picture

I should've thought of that myself. Anyway, the general solution might be a useful feature in a future version.

nancydru’s picture

Status: Active » Closed (won't fix)

Unless someone can come up with a compelling reason why this is not better handled in the theme, I don't think this is within the original intent for this module.

nancydru’s picture

Status: Closed (won't fix) » Closed (fixed)