Community Documentation

Show Block only on Organic Groups (OG) pages - 5.X

Last updated October 21, 2010. Created by ajayg on March 16, 2008.
Edited by ñull. Log in to edit this page.

If you want to show a block only on pages that belong to any organic group then use the follwing snippet.

<?php
$group_node
= og_set_group_context();
return
$group_node->nid;
?>

you can customize this further by something like to show only on a certain groups page.
return $group_node->nid==5;

see here
http://drupal.org/node/175505

About this page

Drupal version
Drupal 5.x, Drupal 6.x

Reference

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.
nobody click here