Skip to content

Instantly share code, notes, and snippets.

@allgood2386
Last active December 17, 2015 16:29
Show Gist options
  • Save allgood2386/5638707 to your computer and use it in GitHub Desktop.
Save allgood2386/5638707 to your computer and use it in GitHub Desktop.
<?php
/**
* Implements hook_node_view().
*/
function sponsor_school_page_node_view($node, $view_mode, $langcode) {
switch ($node) {
case $node->nid == '217308':
if(user_is_logged_in()) {
global $user;
$userGroups = og_get_groups_by_user($user);
dsm($userGroups);
if (isset($userGroups)) {
//issue is here i can only get views with provied arugments, i need to have the exposed filter and form
$view = views_get_view('additional_organic_group_views');
$node->content['show_og_groups'] = $view->
}
}
break;
}
dsm($node);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment