Shane
Shane

Reputation: 1603

Open Atrium - Default Front Page

In OA I'm trying to set the default page to a group i.e. I've selected then put in a group name for example 'intranet' but this says that the page does not exist...

Does anybody know how I can default the front page to a specific group when users log in?

Upvotes: 0

Views: 3086

Answers (2)

summer
summer

Reputation: 26

A bit late replication but hope it will help someone else. You can use function hook_user() with $op 'login'.

yourmoudlename_user($op, &$edit, &$account) {
    if ($op == 'login') {
        $groups = $account->og_groups;
        // redirect to the first group of user
        if ($groups) {
            $groups = array_values($groups);
            $group_node = node_load($groups[0]['nid']);
            $_REQUEST['destination'] = $group_node->purl;
        }        
    }
}

Upvotes: 0

Clive
Clive

Reputation: 36956

You need your group's nid/gid...Go to your group's page and click the 'edit' tab, you should see something like "node/123/edit" or "group/123/edit". The number in the middle is your node ID or group ID. if the path starts with 'node' your front page will be "node/node_id", if it's group your front page will be "group/group_id".

Hope that makes sense

Upvotes: 0

Related Questions