create a view based on particular group and particular content type apply the og theme in this view

Comments

scedwar’s picture

Just make sure the view uses the og context. There are views to do this and they're covered in the manual for og. Works fine once the view properly grabs the og context.

adam_b’s picture

I'm probably being stupid, but what are the views and where are they covered? I've tried cloning views supplied with OG but they don't seem to work.

geshan’s picture

create a module that integrates a view and use hook_views_pre_render();

/**
* Implementation of hook_views_pre_render().
*/
function my_module_views_pre_render(&$view) {
//view url will be siteurl/view_name/groupnid - its very rough code try on your own risk :)

if ($view->name == 'my_view_name') { //or be more specific with arguments or other comparisons.
$groupnode = node_load(arg(1));
og_set_theme($groupnode);
}
}

adam_b’s picture

This looks promising but scary, since I don't know how to do modules...

Would it be logical to say something along the lines of:

IF groupnid = xxx
og_theme = yyy
WorldFallz’s picture

adam_b’s picture

Themekey is great but doesn't have any OG-related properties (so far - I'm lobbying to have them added). I hadn't seen Sections - will take a look, thanks.