So i've looked around for a quite a while here, and couldn't find anything. I'm using og / spaces / purl and have a need to redirect any time the user hits the group's node within a space to the space's front page. So for example http://www.example.com/space-prefix/node/21 (node 21 being an og group) to redirect to http://www.example.com/space-prefix/. I would think that this is already included functionality, am I just doing something wrong?

Also, apologize in advance if I picked the wrong module in the stack to file the issue in :)

Comments

netrics’s picture

Yes I am also having the same problem. I can't figure out how to make my spaces purl just point to the group path instead of using it as a prefix before it. There doesn't seem to be enough documentation on how to do this in 7.x yet, and I cannot find any resources online either.

Has anyone figured out how to accomplish this?

chertzog’s picture

Here you go. I just needed to do this as well.

Around line 60 of spaces.admin.inc:

 
  $options['node/'. $space->id] = 'Group Node'; //<- ADD THIS LINE

  ctools_include('dependent');
  $form['site_frontpage'] = array(
    '#type' => 'select',
    '#options' => $options,
    '#title' => t('Default front page'),
    '#default_value' => 'node/'.$space->id, // <- CHANGE DEFAULT VALUE
    '#description' => t('The home page displays content from this menu item.'),
    '#element_validate' => array('spaces_site_frontpage_validate'),
  );
heylookalive’s picture

I'm also wondering this, there must be a way to do this without hacking the module (and not implementing a hook_form_alter)?