Create a dynamic context driven panel

Events happening in the community are now at Drupal community events on www.drupal.org.
drupauler's picture

I have contents type Event and EventBlog, EventBlog entries contain an entity reference to the associated Event.

(I'm using Drupal 7, Panels 3 and Entity reference.

I want to create a two pane panel with Event on the left and the associated EventBlog on the right. This will be the main Event page so should be triggered by content type=Event.

In principle this would seem trivial yet after significant effort I cannot work it out and none of the literature seems to contain any examples either so this is obviously highly advanced stuff. Any guidance, references, recipes would be most welcome. Thanks.

Comments

View pane with node id argument

jason.bell's picture

Seems like it should be possible. Thinking about it without building it out… If the base panel is a node variant displaying the Event node, then displaying a Views based pane of Event blog posts that takes the node ID as an argument (contextual filter) should accomplish what you're looking for.

Ok, Ive figure out how to use

drupauler's picture

Ok, Ive figure out how to use node_template to set a panel driven by content type and I have a view showing block/content pane listing all the blog entries.

The last bit of the jigsaw is to set a filter to limit the view display to the currently view event. AIUI this involves setting an argument in the panel and passing it to the view, but right now I don't know how to do that.

Finally got this working.

drupauler's picture

God that was painful. When I get around tuit I'll document the process, if for no other reason than to make sure i can do it again.

And thanks for your support, Jason.

Hi, I know its old thread,

vincent_jo's picture

Hi, I know its old thread, but could you please explain how you solved this problem? Can´t find newer explanations on that topic.

I have the same/similar task:
There are events ( content-type: Events)
and presenters (c-t: presenter)

I have a node-override page in panels for the event.
I want to add a block to display the related presenter.

I´m quite confused about the relations between two content-types > entity reference > views > panels

Please give me a hint

regards

Vincent

Potentially simpler

jason.bell's picture

Vincent it sounds like your use case might be slightly different. Do you have an entity reference field on your Event node that references a Presenter? I'll assume so and without seeing what you're working with make a guess at one way to solve your issue…

Presenter > Manage Display

  • Select a view mode that you can use for display on the Event (like Teaser)
  • Set the display format for Presenter fields

Event > Manage Display

  • Use Default or Full content view mode
  • Set the display format for your entity reference field to "rendered entity" and select the view mode you set above for Presenter

Event Panels variant

  • You can display the node content in your panel or place the Presenter reference field as you'd like

Thank you Jason, I´ve got it

vincent_jo's picture

Thank you Jason, I´ve got it :)

the trick is not to select any special relationship or context in panels! (apart from the node-override selection rule)
As I know it from taxonomy panels, I tried to put a relationship in the context selection of panels.
As you didn´t mention any special relation for panels, I just left this clean ... and it works :)

... it took me days ;-)

best regards

Vincent

Panels

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: