Creating Subgroup for the Organic Groups

  • 18 July 2013
  • mohit.aghera

I have long history of working with organic group modules. Organic groups and views are the modules which i have worked the most. Nearly half of my projects i have used organic group module either way.

Recently i came across one other requirement to creating the subgroups for the organic group module.

Though the task was pretty simple as i follow the steps from Here is the step by step points which i followed to achieve it.

This module enables a user with the proper permissions to build group hierarchies (or tree) by nesting groups under other groups. Simple or complex group hierarchies can be easily created.

  • Now create a content type called 'subgroup' or you can give any name which you want to keep as content type. You can also add appropriate fields.
  • Goto the following path: administration->configuration->organic groups->OG field settings (admin/config/group/fields)
  • Now select "subgroup" content type on this page, as we are adding group fields for this content type.
  • After selecting the content type from the dropdown of content type, you should see "Groups Audience" as a field.

If you don't, select your node type from the bundles dropdown and in the fields drop down, select "group audience" and save it. If you want to go one further, add "group visibility" and "group content visibility" to it too. This is extra credit.

  • Now come back to Administration->Structure->Content types->Subgroups (i.e. content type you created)

You should find the Group tab in the tab groups or menu settings group. You should select "group type" and "not a group content type" -- this marks thing as a group as opposed to say a group aware article.


Now create a subgroup and select the appropriate group as parent group or major group for the subgroup you are creating.

You are done :)

Stay tuned for the view that will display subgroups of current group :)


Update : 

I have added an article by displaying the view for the organic group:










zeeshan1's picture

Should there be an alternate enticing post you can impart next time, I'll be without a doubt sitting tight for it. 

Injustice Hack



Add new comment