[support] getting block to show up for specific pages and specific node type
brendan, fresh-off.com
hello at fresh-off.com
Fri Nov 6 23:14:25 UTC 2009
Hello,
I found a code snippet on drupal.org that allows a block to be shown only on
specific node types when 'Show if the following PHP code returns TRUE' is
checked on the Configure Blocks page:
-----
<?php
if ((arg(0) == 'node') && is_numeric(arg(1)) && !(arg(2))) {
$thenode = node_load(arg(1));'
if ($thenode->type == 'blog') {
return TRUE;
}
}
?>
-----
this works great, except for that I'd like the block to show for nodes of
type "blog" AND also on specific pages - in my case www.mysite.com/blog
which is a view showing a list of blogs. How can I do both?
----
brendan, fresh-off.com
Creative Direction & Consultation: Web | Print | Brand
http://fresh-off.com
hello at fresh-off.com
206.328.1067
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20091106/5d2a260d/attachment.html
More information about the support
mailing list