In this video, I'll show you how to configure the view panes that come with Organic Groups and add a new view that lists all of the groups on the site. I will also introduce you to new views that did not exist in the OG 7.x-1.x version, which are the OG all user group content, OG content and OG members admin views.

Enable modules


The first thing we need to do is enable a couple of modules.

  • Go to "Modules" (admin/modules) and enable:

    • Views Content Panes
    • Views UI
  • (Save Configuration)

OG Views

  • Go to "Structure => Views" (admin/structure/views)

OG all user group content

This view shows content from all groups the current user belongs to. This might be a good view to use as a homepage, or if slightly modified, could be placed on user profile pages.

OG content

Show all content of a group. We’ll use this later when we layout our group pages.

Organic groups members

This view lists the most recent members of the current group. The view comes with a block display, and a Content pane. If you choose not to use Panels, you can place the block on group pages through the standard “Blocks” page. But, I’ll be laying out groups using panels, so I’ll just work with the Content pane. As you can see it is listing the most recent 5 users by default. You can change that to whatever suits your needs.

Note: We'll display this in Video 3 - Organic Groups Layout

OG members admin

This is the default view that is used when you click the “People” tab in a group.

Note: In Video 16 - Organic Groups Settings we’ll see where we can select a different view for the “People” tab.

OG user groups

This is a list of all the groups the logged in user is a member of. You can change the default settings here but I am good with the defaults, so I will leave them as they are.

Organic group list

Previous versions of Organic Groups came with a list of all groups. If you’d like to create a list of all your groups so that users can find one, or browse the groups available, you’ll want to set that up as a view. Let’s go ahead and do that now.

  • Go to "Structure => Views" (admin/structure/views)
  • Click "Add new view"
    • View name: OG List
    • Show: Content of type Group
  • [x] Create a page
    • Path:og-list (this is where you can navigate and view the list of groups)
    • Display format: Table
    • (Continue & edit)
    • Under Page Settings, Click “No menu” to add a menu item
    • Type: Choose "Normal menu entry"
    • Title: All Groups
    • Description: List of Groups
    • Menu: Click drop down and choose "Main menu"
    • Click "Apply"
  • (Save)

Now, we can view the page by clicking “view Page”. Here, we see the group, and as we create additional groups, they will be listed in this table.