Drupal 7 Panels integration guide (OG 7.x-1.x)
Last updated on
30 April 2025
Introduction:
Since Drupal-7.x, Organic Groups changed a bit and the recommended way to display your group content is with Panels. This guide assumes you have followed steps 1 through 8 of the README.txt that comes with Organic Groups.
Videos:
- There is a screencast series by bjlewis2 that demonstrates everything in this guide (including steps 1-8 of the README.txt), with a few additions.
Required Modules
Enable subscribe & unsubscribe group links
- Go to admin/structure/types/manage, and click on "Manage Display" for the "Group" content type
- For the "Group type" field, change the display format to "Group subscription". This will show "Subscribe to group" link for privilege users.
Panel Node template override
The Panel Node template variant is what will allow us to override the default view for Group content types.
- Go to admin/structure/panels and under "Manage pages" enable "Node template"
- Click Edit.
- Click "Add a new variant"
- Name it "OG panel" and check on both "Selection rules and Contexts" then click the "Create variant" button
- Selection Rules: Select "OG: Node is a group" from the menu drop down then click Add. This will ensure your panel is only used for nodes that are OG groups.
- Click Continue
- Contexts: Under Contexts, you do not need to add a context.
- Under Relationships, choose "OG group from node"
Note: If you have already created group content node types, there will also be contexts listed like "OG group from Node (on Node:Group Audience)". Do not use these contexts for your group panel. They attempt to get the context from the group content nodes, and will fail, and group-related panes won't appear. You need to use these if you're trying to set up a group content panel. - Click Add Relationship, then click Finish
- Click Continue
OG panel content layout
In this section we will layout our panel with two columns 25/75 for our group content.
- Select flexible as the panel layout and click Continue
- Check the "Disable Drupal blocks/regions" checkbox
- Click continue
- Click on the "Show layout designer"
- On the panel click on the "Row" link and select "Add region to left"
- Name it "Left Region" then click Save
- Resize the left region to 25% with your mouse by dragging the bar between the Left and Center regions
- Click on the "Hide layout designer" button
- Click "Create variant"
Add panel content
It's time to populate our newly created panel layout with our group related content
Left region content:
- Click on the gears icon to the left of the left region then click "Add content"
- Select the "View panes" category from the left
- Select "og members" and use Block for view display then click Finish
Center region content:
- Click on the gears icon to the left of the center region then click "Add content"
- Select the Node category from the left
- Select "Node content"
- Uncheck "Link title to node"
- Select "Full content" for Build mode
- Click Finish
- Click on the gears icon to the left of the center region then click "Add content"
- Select the Views panes category from the left
- Select "og nodes" then Continue
- Click Finish
- Save your panel by clicking on "Update and save" button then view your group page
You should now have a basic understanding of OG and Panels integration. Explore the "contexts" features integrated into panels for organic groups for more flexibility and control of content.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion