Segregate groups from main drupal site

1.I am trying to segregate og groups from the main drupal site. I have too many blocks on our main site that interfere with og. I have tried page specific visibility settings for blocks, works ok but for 60+ groups it is difficult.

I have also tried disabling "Show blocks" settings, works fine for og_panels pages but the blocks for the main site reappear when creating/editing group specific content.

Is there an easier way to segregate og from the rest of my drupal site without using a different database or subdomain.

  1. How do I get the group notifications block to appear in my og_panels as embedded, page or block? I cannot figure this out.

Thank You for this great new functionality with og

Login to post comments

Maybe Pathauto to the rescue?

hailstorm - Sun, 2008-08-17 12:52

Hi gmasky,

I'm working on a project where I can expect 500+ new groups each 3 months. So adding each new group to all blocks would be silly. I use the pathauto module to solve this problem. My og content type uses a specific path that starts with the keyword group followed by the group title "domain.cno/group/title". Then I can use the block visibility and simply add "group" and "group/*".

Another solution would involve a special template. You can copy the template from the og module to your theme directory and make the changes to it. As far as I know, it is also possible to have a different page template for each content type, but I have not tried this solution yet.

Best regards

Hailstorm
Mike


php visibility

moshe weitzman's picture
moshe weitzman - Sun, 2008-08-17 13:36

<?php
$group_node
= og_get_group_context();
if (!empty(
$group_node) {
  return
FALSE;
}
?>

or return TRUE, if you do the block to appear on group pages. this works for all group pages, not just group home page.


php visibility

gmasky - Sun, 2008-08-17 16:10

This bit of code does not work when I insert it in Page specific visibility settings->Show if the following PHP code returns TRUE (PHP-mode, experts only).

<?php
$group_node
= og_get_group_context();
if (!empty(
$group_node) {
  return
FALSE;
}
?>

Any help will be appreciated

Gerry


The most obvious problem is

globaldrifter - Mon, 2008-08-18 05:09

The most obvious problem is a missing paren. See line 3. Fixed below.

<?php
$group_node
= og_get_group_context();
if (!empty(
$group_node)) {
  return
FALSE;
}
?>


#1

gmasky - Mon, 2008-08-18 08:05

Thanks,

I tried this piece of code on my navigation block. I can get the block to disappear, however it disappears for all regular drupal pages (frontpage) too and not just group specific pages.

Any help will be appreciated