Panels integration for OG home pages
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #168036. --> Reported by: [owen barton](https://www.drupal.org/user/19668) >>> <p>On a recent project, we needed to split the different content types on the group homepage into different blocks. This is a major pain to do using the Drupal blocks interface, because you need to add php for each blocks visibility settings to only show them on OG pages (and to hide the 'regular' blocks on OG pages).</p> <p>I came up with the idea of using panels, which should be able to do this much more elegantly. You can simply pass the nid argument into any view panes, each of which can have an OG argument.</p> <p>Initially I tried the (trivial) approach of redirecting OG nodes to 'mypanel/'. arg(1) - but the issue with that is you loose the menu context (and most importantly, the OG node edit tabs!). I also toyed with inserting the panel in the theme, or trying to relocate the menus but they both quickly became very hackish. The best approach then is to add the panels to the node page, rather than vice versa.</p> <p>So here is a patch that does this. If panels is enabled (I don't think we want to make it a requirement for OG just yet anyway!) then an interface appears that lets you select between Views and Panels as the main presentation engine, and then select which view or panel should be used. I didn't add any prefixing rules, since that seemed overboard at this point.</p> <p>When viewing the OG home then, the panel (if selected) is then loaded and appended to the node object. It is then pretty easy in the site theme to integrate this into your regular layout (e.g. by pulling the panel sidebars into your theme regions).</p>
issue