Passing Arguments to the Calendar with OG, Panels 2

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

Hi all,
I'm using Calendars (version "5.x-2.3"), Panels 2 (version = "5.x-2.0-rc1a"), Organic Groups (version = "5.x-2.0-rc1a"), and I'm attempting to create a calendar for each group.

Unfortunately, the excellent guide here http://vineyardvoice.org/files/how_tos/groups_walkthrough/index.html is slightly out of date now, and I can't find anyway of passing the needed arguments through to the calendar. The views pane seems to cause the Calendar to select the current node ID as the date argument, even with the view argument handling code in place.

Any advice would be greatly appreciated. I'd be happy to write up documentation if I can get it to work.

dwest

Comments

Arg Code for calendar

lowVocal's picture

There may now be a simpler solution, but did you look at the code (and where to place it) at the bottom of the step-by-step? It does work. It establishes and calls the current group id. And make sure you have passed the args through to the view!

http://vineyardvoice.org/files/how_tos/groups_walkthrough/index.html

Success! Use View Pane to pass the context "pane argument"

west_d_r's picture

Success! As you suspected Patrick there is now an easier way, which 4 hours of trial and error provided me. When creating the Panels Page, you need to select Node ID as an argument, then Group as the relationship. when you create the Views Pane, under "Argument source:" you select "from panel argument", and set the order just as you did when adding the arguments to the view itself. This results in everything displaying correctly.

The only trick is that the view title originally kept showing up as %4 (obviously trying to pull in the current date, but it seems as if the View Pane won't pass the argument to Pane Title) that's fine by me. I over road the title to something static like "Group Calendar", I suppose you might be able to use the group name variable and have a custom title, but I haven't tried.

Thanks for the advice. Where's the best place to add this additional information, so that others can save time?

EDIT: Using the steps above, the argument handling code in the view does not appear to be necessary.

cool

najibx's picture

Group as the relationship eih ..i never tried that. Glad it works ...and will give it a try. At the moment I simply, modify the 'calendar' Views add an arg "group name" and move it at the top. to my url become like calendar/GROUP_NAME/2008/8

How about mini calendar block? I currently have it 'outside' the content area, not inside the panel, unless I remove all blocks, and recreate my 2/3 column layout ...

-najibx -
<a href="http://www.successideaweb.com>Drupal web developer | designer in Malaysia

To clarify: I set the "view

west_d_r's picture

To clarify: I set the "view page url" to node/$group/calendar. That way I could still override the group url and the subsequent calendar urls with a panel.

I am still encountering one

west_d_r's picture

I am still encountering one bug. When a non-admin account views a calendar set that returns no nodes it won't provide the empty text. instead I get the following at the top of the page:

n/an/aYear • Month • Week • Day

The authorized user role has all the necessary permissions to view this panel page, pane, and view, so I'm not sure what's going on.

When the admin views that page i get properly rendered empty text.

Any ideas?

Panels

Group organizers

Group notifications

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