This article will create the simple view that will display the sugroups of current group.

I have written an article for creating the subgroup of groups: http://mohitaghera.drupalgardens.com/content/creating-subgroup-organic-groups

Actually i have used the default view provided by the organic group module, but have made a little tweak like changing the content type and etc..

You can directly import the view for the usign.

$view = new view();

$view->name = 'og_subgroups';

$view->description = 'Show all content (nodes) of a group.';

$view->tag = 'og';

$view->base_table = 'node';

$view->human_name = 'OG Subgroups';

$view->core = 0;

$view->api_version = '3.0';

$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */


/* Display: Defaults */

$handler = $view->new_display('default', 'Defaults', 'default');

$handler->display->display_options['title'] = 'Sub Groups';

$handler->display->display_options['use_more_always'] = FALSE;

$handler->display->display_options['access']['type'] = 'none';

$handler->display->display_options['cache']['type'] = 'none';

$handler->display->display_options['query']['type'] = 'views_query';

$handler->display->display_options['query']['options']['query_comment'] = FALSE;

$handler->display->display_options['exposed_form']['type'] = 'basic';

$handler->display->display_options['pager']['type'] = 'full';

$handler->display->display_options['style_plugin'] = 'default';

$handler->display->display_options['row_plugin'] = 'node';

/* No results behavior: Global: Text area */

$handler->display->display_options['empty']['area']['id'] = 'area';

$handler->display->display_options['empty']['area']['table'] = 'views';

$handler->display->display_options['empty']['area']['field'] = 'area';

$handler->display->display_options['empty']['area']['empty'] = TRUE;

$handler->display->display_options['empty']['area']['content'] = '%1 group doesn\'t have any subgroup yet.';

$handler->display->display_options['empty']['area']['format'] = 'filtered_html';

$handler->display->display_options['empty']['area']['tokenize'] = TRUE;

/* Relationship: OG membership: OG membership from Node */

$handler->display->display_options['relationships']['og_membership_rel']['id'] = 'og_membership_rel';

$handler->display->display_options['relationships']['og_membership_rel']['table'] = 'node';

$handler->display->display_options['relationships']['og_membership_rel']['field'] = 'og_membership_rel';

/* Sort criterion: Content: Post date */

$handler->display->display_options['sorts']['created']['id'] = 'created';

$handler->display->display_options['sorts']['created']['table'] = 'node';

$handler->display->display_options['sorts']['created']['field'] = 'created';

$handler->display->display_options['sorts']['created']['order'] = 'DESC';

/* Contextual filter: OG membership: Group ID */

$handler->display->display_options['arguments']['gid']['id'] = 'gid';

$handler->display->display_options['arguments']['gid']['table'] = 'og_membership';

$handler->display->display_options['arguments']['gid']['field'] = 'gid';

$handler->display->display_options['arguments']['gid']['relationship'] = 'og_membership_rel';

$handler->display->display_options['arguments']['gid']['default_action'] = 'not found';

$handler->display->display_options['arguments']['gid']['default_argument_type'] = 'fixed';

$handler->display->display_options['arguments']['gid']['summary']['number_of_records'] = '0';

$handler->display->display_options['arguments']['gid']['summary']['format'] = 'default_summary';

$handler->display->display_options['arguments']['gid']['summary_options']['items_per_page'] = '25';

$handler->display->display_options['arguments']['gid']['specify_validation'] = TRUE;

$handler->display->display_options['arguments']['gid']['validate']['type'] = 'og';

/* Filter criterion: Content: Published */

$handler->display->display_options['filters']['status']['id'] = 'status';

$handler->display->display_options['filters']['status']['table'] = 'node';

$handler->display->display_options['filters']['status']['field'] = 'status';

$handler->display->display_options['filters']['status']['value'] = '1';

/* Filter criterion: OG membership: Group_type */

$handler->display->display_options['filters']['group_type']['id'] = 'group_type';

$handler->display->display_options['filters']['group_type']['table'] = 'og_membership';

$handler->display->display_options['filters']['group_type']['field'] = 'group_type';

$handler->display->display_options['filters']['group_type']['relationship'] = 'og_membership_rel';

$handler->display->display_options['filters']['group_type']['value'] = array(

  'node' => 'node',

);

/* Filter criterion: Content: Type */

$handler->display->display_options['filters']['type']['id'] = 'type';

$handler->display->display_options['filters']['type']['table'] = 'node';

$handler->display->display_options['filters']['type']['field'] = 'type';

$handler->display->display_options['filters']['type']['value'] = array(

  'og' => 'og',

  'subgroup' => 'subgroup',

);


/* Display: Content pane */

$handler = $view->new_display('panel_pane', 'Content pane', 'panel_pane_1');

$handler->display->display_options['argument_input'] = array(

  'gid' => array(

    'type' => 'context',

    'context' => 'entity:node.nid',

    'context_optional' => 0,

    'panel' => '0',

    'fixed' => '',

    'label' => 'OG membership: Group ID',

  ),

);

 

Comments

and the potential impact of future initiatives. <a href="http://disney172discsdvdboxset.tumblr.com/">Cheap Walt Disney's 100 Years Of Magic 172 Discs DVD Boxset</a>|<a href="http://chuckseasons1-5dvd.tumblr.com/">chuck Seasons 1-5 DVD Box Set</a>|<a href="http://caneseasons1-5dvd.tumblr.com/">cane Seasons 1-5 DVD Box Set</a>| <a href="http://truebloodseason6dvd.tumblr.com/">True Blood Season 6 DVD Box Set</a>| <a href="http://suitsseasons1-2dvd.tumblr.com/">Suits Seasons 1-2 DVD Box Set</a>|<a href="http://rosettastonev3spanish.tumblr.com/">Rosetta Stone V3 Spanish (Latin America) Levels 1-5</a>

Actually i have used the default view provided by the organic group module, but have made a little tweak like changing the content type and etc.. know about this. I think you made some good points in Features also. Keep working, great job!
<a href="http://vampirediariesseason4dvd.tumblr.com/" rel=dofollow>The Vampire Diaries dvd box set</a>|<a href="http://30rockseasons1-7.tumblr.com/" rel=dofollow>30 rock DVD

Box Set</a>|<a href="http://thewalkingdeadseasons3.tumblr.com/" rel=dofollow>The Walking Dead dvd box set</a>|<a href="http://thekillingseason3dvdsale.tumblr.com/"

rel=dofollow>the killingdvd box set</a>|<a href="http://90210seasons1-5dvd.weebly.com//" rel=dofollow>90210 1-5 dvd box set</a>|<a href="http://downtonabbeyseasons1-

3dvd.weebly.com/" rel=dofollow>Downton Abbey dvd box set</a>

This blog was really an awesome site which I had never found it anywhere. Lots of stuff in this site !

Nicely published information in this post, I prefer to read this kind of stuff. The quality of content is fine and the conclusion is advantage.

Does your website have a contact page? I'm having trouble locating it
but, I'd like to shoot you an email. I've got some creative ideas for your blog you might be interested in hearing.
Either way, great site and I look forward to seeing it improve over time.

Post new comment