By Nigeria on
Hi,
Can anyone tell me how I can show a block only when the page is displaying a node of particular conent type.
For example I might want to show a block showing the weather only when a node created with a user defined (i.e. created with CCK)city content type, is being displayed.
Thanks in advance.
Comments
PHP visibility handling
Found this here and tested (works fine):
Paste the code into the "Page specific visibility settings" area on the Block's settings page. Set the option to "Show if the following PHP code returns TRUE". Then just edit the
$types = array('book', 'news', 'anothernodetype');line and you should be good to go.-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides
Thanks
Thanks a lot.
I really think that this sort of functionality should be in core so that you can just select which content types you want just like the visibility in regards to pages
Ade Atobatele
Ade Atobatele