How can site admin assign a specific theme to an organic group and all its content?

I don't mean any fancy solution where group manager is allowed to pick his favorite theme.

Simply site admin picks a theme for one group,
could be some hacky solution like (inserted somewhere?):

$group_node = og_set_group_context();
$group_nid = $group_node->nid;
if $group_nid == 355 {   //e.g. group 355
apply custom theme
}

Comments

moshe weitzman’s picture

This code has to run early in the request. I suggest putting it in hook_menu(!may_cache) in your custom module.


$group_node = og_set_group_context();
$group_nid = $group_node->nid;
if ($group_nid == 355) {
  global $custom_theme;
  $custom_theme = 'marvin'; //or whatever
}

moshe weitzman’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.