By tristanmatthews on
Hi All,
So I have what I thought would be a relatively simple problem, but has turned into a real beast.
I'm setting up a calendar page an want to make a menu of the months for featured events. The idea is that the site admin can then easily add new featured events to that menu and link to them. The problem is that I'd then link the month titles to link to say the next January on my calendar. The views calendar takes arguments like 2011-1, so the easy solution (I thought) was to figure out some way set the menu links to what I want when displaying it. I've tried a number of things but can't make any of them work.
Any Ideas?
-Thanks
tristan
Comments
It sounds like you're trying
It sounds like you're trying to create a dynamic list of links to a set of views. The list will include a link to each month when a featured event occurs. Could you use a view instead of a menu to display that list of links? Try creating a view over the featured events, and then linking to the month when that event occurs rather than the event itself.
I'm not sure I'd know how to
I'm not sure I'd know how to create a view with the desired structure. It works very naturally as a menu that looks something like
January
Event 1
Event 2
Event 3
February
Event 4
March
....
Where everything is a link, and setting the month links is what I'm having problems with. If I understand what your saying I can make a view and group by month (might need to add a field or something), and then set the group titles as links?
That's right. You'd have to
That's right. You'd have to group by date in the view, and then add a custom template for the date so it only displays the month value, not the full date. The instructions here should work well: http://drupal.org/node/388140.
Then you'll also have to link the date field to the appropriate views page. You should be able to do this in the template given that you have the year/month available.
Thanks, worked perfectly.
Thanks, worked perfectly.