By martinb9999 on
In 4.7, the blocks config page claims that you can show blocks based on a PHP condition, but I can't get it to actually work.
The way I think it, this should show the block for nodes (and nodes only):
<?php
(arg(0) == 'node')
?>
However no joy, and I can't find any examples in the handbook. What's the correct syntax?
Incidentally, what happened to the old "show only on the following node types" option..?
Comments
return?
I've gotten this sort of thing working using a "return" statement, see:
http://drupal.org/node/56641#comment-107384
---
Work: BioRAFT
And work it does!
Many thanks for this - can we please have your example in the handbook?
Cheers
Martin
hanbook is open
everyone is free to submit a page.
--
My developer blog. | The news is Now Public | Ask not what Drupal can do for you -- ask what you can do for Drupal.
--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.