Closed ericras closed 8 years ago
function unl_init() {
// Set a Group Context on taxonomy term pages that have a "Groups audience" field attached.
if (module_exists('og_context')) {
$term_group = _group_context_handler_entity('taxonomy_term', NULL, 2);
if (!empty($term_group)) {
foreach($term_group as $entity_type => $entity_ref) {
foreach($entity_ref as $key => $id) {
og_context('node', node_load($id));
}
}
}
}
Tried it within the OG theme in the preprocess functions but it only causes the theme layer stuff (like site title) to change. It runs too late to get the OG Menu set properly. Thus I intend to stick it in the UNL module
strikeout: this was about Feeds in another issue ....... Any newer breaks Image Grabber