Panels2 and Organic groups - the early years

I'll be deeply integrating panels and organic groups over the coming weeks. Today I want to show what is possible __now__. Each group type on your site (you do know that you can have multpiple types of groups, right?) can have its own custom homepage presentation. This screenshot tutorial shows you how to do it.

Review your group node types

Browse to admin/og/og and review the Group home page section. Here we see that our demo has specified two node types which behave as a group. Each of these types can have its own custom panel.

Create a panel page

Browse to admin/panels/panel-page and Add a new page.

Customize panel page

Your panel page will render node detail pages whose path is node/%.

Add a Node ID context

Add a Node ID argument while using the Context tab.

Configure the Node ID context

The Node ID context helpfully lets you limit the panel to specified node types. Here, we select the two nodes types that act as groups. The Own display checkboxes indicate that these node types can differ in how the layout the panels and the contents of each pane. This provides us with quote a lot of flexibility for each content type.

Add content to the panel page for each group node type.

On the Content tab, we see 3 subtabs. Notice how each of our group types, Department and Focus Group, gets own subtab. That is how we specify the custom content for each. We could if we want, browse to the Layout tab and specify different layout for each as well. On this page, populate the panes with blocks and Views and custom PHP content such that you accomplish your desired presentation. Note that the GHP RON item in the right Side pane is a View. See the next step.

Make your Views available to Panels

We will want usually want to add one or more Views to our group homepage. To do so, browse to admin/panels/views and Create Panel View for each one. Adjust your settings to taste. When you are done, these Views show up when customizing the panes on the Content tab.

Success! A custom group homepage.

Our finished product. The group homepage includes the usual list of recent posts on the right hand side, but a list of recent subscribers is on the left and the mission statement on top. I'm sure you will come up with more original presentations. The point is that you are empowered now to layout the group homepage as you wish, without writing any code.


I committed it. It is called

I committed it. It is called og_panels module and it is in the latest OG (to be released soon).

Submitted by weitzman on Mon, 03/24/2008 - 20:17.

Powered by Drupal, an open source content management system

About

Moshe WeitzmanMoshe Weitzman is a long time Drupal developer (since 2001). He manages groups.drupal.org and the Organic Groups module. His tiny company, Cyrve, specializes in data migration into Drupal. Read about his past projects (e.g. NY Observer) and contact him.

Moshe lives in Boston USA with his wife and 2 girls.

My Photos

Think!

Change Congress

Support CC - 2007

Support Obama 2008

Stop the Spying - EFF

Syndicate

Syndicate content