OG Block Visibility and Menu

barbnooch - October 5, 2009 - 16:37

Hello,
I am trying to set up a site that consists of several 'mini' sites, meaning each mini site has its own navigation on the left. I am trying to accomplish this by making the mini sites into Organic Groups and using OG Menu and OG Block Visibility.

So far, it's working the way I want it to as long as I'm logged in as a member of the group. So, the group menus only show when I'm viewing a group post or group home page (ie when I'm in a group context). However, when I log out to be an anonymous user, I can't see any of the group menus. So it appears that i have to be a member of the group in order to view the menu. However, when I go to edit a specific menu I leave the "Group Permissions:" (Restrict menu access to the selected groups) unchecked and I was under the impression that would make it so everyone (even anonymous users) can see the menu as well.

Is there another setting I'm missing? Any ideas about how to accomplish this?

Dug into the code...

barbnooch - October 5, 2009 - 17:06

Ok, so I dug into the code and it was the following statement that was making it not work the way I wanted it to (ie showing the menu block to the public)

    // Is the block public?
    if ($group->og_selective <= OG_MODERATED) {
      return TRUE;
    }

At first I had the group set so that only the admin could control membership (Closed - membership is exclusively managed by an administrator). When I set it to moderated (Moderated - membership requests must be approved) it worked.

My only question now is what the membership requests setting has to do with whether the block is public or not? What if I want closed membership but public access (ie group members can post and edit pages, but the public can see all the posts)?

 
 

Drupal is a registered trademark of Dries Buytaert.