Jump to:

11002 Posts in 2734 Topics by 1823 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar: Grouping By Category

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 725 Views
  • DanStephenson
    Avatar
    Community Member
    115 Posts

    Event Calendar: Grouping By Category Link to this post

    Hello, if we use the "Extending the Event Calendar" tutorial as an example (http://doc.silverstripe.org/old/recipes:extending_the_event_calendar?s=recipes%252520calendar), there are two things I am trying to achieve, and hope someone can help me with them.

    1. When a user has selected a date via the Calendar Widget or the Filter form, I want to group the events by category. So instead of just displaying them all in cronological order, I want to be able to display events groups by category, chronologically:

    October 18, 2011

    FINANCE
    Workshop 9:00am
    Workshop 10:00am
    Workshop 3pm

    ADMINISTRATION
    Workshop 11:00am
    Workshop 1:pm

    -----------------
    Right now I have this setup so each "category" is really a calendar, and then there is one master calendar that pulls all the dates (which is the one that the user queries). I figured categories would be an easier way to solve the problem, but I am open for either way!

  • redactuk
    Avatar
    Community Member
    117 Posts

    Re: Event Calendar: Grouping By Category Link to this post

    I wanted to achieve this also, but in the end decided to cheat. Knowing my groups were fixed and there were only three, I just inserted my template loop three times in the template, the build a custom condition to test the category type for each. So for the first loop I only output events from the first category, in the 2nd loop only events from the 2nd category etc..

    A dirty solution yes, but in my case as my groups were fixed save me writing whole load of extensions or even rewriting part of the mod.

  • DanStephenson
    Avatar
    Community Member
    115 Posts

    Re: Event Calendar: Grouping By Category Link to this post

    I considered the same thing, but my groups are going be changing.

    725 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.