I am trying to create Facebook-like group pages, I have a working group node "group"
I followed the tutorial for overriding the node page, as written out in the documentation found on the handbooks. But I have failed..
Have a look at the attached file for the exported code
thanks
| Comment | File | Size | Author |
|---|---|---|---|
| group_panel.txt | 5.74 KB | droople |
Comments
Comment #1
merlinofchaos commentedI'm sorry, there needs to actually be a question that I can answer. I'm not going to do your work for you.
Comment #2
droople commentedomg, didn't mean for you to do my work,
I was just wondering if the panels could be used to override a group node type....
So the question should have been:: Does panels override group nodes??
thanks
Comment #3
merlinofchaos commentedYes, you can have panels override group nodes by using a panel page, setting the path to 'node/%', and adding a 'Node: id' argument. You then select the node type(s) that you use for group nodes, and set up your display as you like.
The downside is that this isn't quite smart enough to know that your panel is actually a group, it only knows that it's a node. It'll take some extra work -- to have group specific contexts. But such contexts could be used to provide richer available content.
You can still get by with it just being a node and adding views and such based on the node, of course. But you'll definitely want og to expose its non-view content to Panels so that you can get to the really cool stuff.
Comment #4
jacobson commentedOf course, this works, but could you help me understand how the node/% element of your instruction causes Drupal to replace the standard group node page with the panel? Thanks. HAJ
Comment #5
sdboyer commented@jacobson: og_panels takes care of this considerably more effectively than panels_page does, now.
In brief, though, what happens:
1. Page request is made to node/42
2. Panels grabs the request (via the menu system & hook_menu()), determines that node 42 is a node type it's overriding
3. Panels loads up the corresponding display for that node type, and proceeds with panels' rendering process -
panels_render_display()- with the node object of nid 42 loaded into panels context.Comment #6
jacobson commentedFrom what I've read about the functionality in 5.x for og_panels, there is no doubt that it is a great solution to the need for customizing og group home pages. I understand that og_panels isn't ready for 6.x yet, but I hope it's soon. Views / Panels / OG is a great combination.
Comment #7
socialnicheguru commenteddoes og_panels provide context?
I am a little confused. I am converting pages to panels and they need context.
i would like to recreate these panel pages in groups.
But I am not sure how to implement context. if there is no context available in og_panel, then how can I simulate a panel page without context?
solution: I ended up creating in panels and used a node override of panels.
The only issue i have is how to have my 'more' link point to the override panel with the url node/%/mypanelpage
Chris
Comment #8
sunPlease consult OG for improving Panels integration.