paul@20 | 1 | ##master-page:HelpTemplate |
paul@20 | 2 | ##master-date:Unknown-Date |
paul@20 | 3 | #format wiki |
paul@20 | 4 | #language en |
paul@20 | 5 | |
paul@20 | 6 | == EventAggregator == |
paul@20 | 7 | |
paul@20 | 8 | The !EventAggregator macro for !MoinMoin can be used to display event calendars or listings which obtain their data from pages belonging to specific categories (such as CategoryEvents). |
paul@20 | 9 | |
paul@20 | 10 | == Creating Events == |
paul@20 | 11 | |
paul@20 | 12 | Before creating any events, create a category for those events. You can do this by filling out and submitting this form: |
paul@20 | 13 | |
paul@20 | 14 | <<NewPage(CategoryTemplate,Add a new category,,Category%s)>> |
paul@20 | 15 | |
paul@20 | 16 | Each event must be created on a new page belonging to the appropriate event category. For CategoryEvents, you can do this by filling out and submitting this form: |
paul@20 | 17 | |
paul@20 | 18 | <<NewPage(EventTemplate,Add an event)>> |
paul@20 | 19 | |
paul@20 | 20 | The event page describes the event in more detail, and the start and end dates of the event must be specified in a definition list so that they can be read from the page and displayed by the !EventAggregator. The EventTemplate provides some guidance, and all you need to do is to replace the `YYYY-MM-DD` placeholders with actual year, month and day values. For example: |
paul@20 | 21 | |
paul@20 | 22 | {{{ |
paul@20 | 23 | Start:: 2009-06-28 |
paul@20 | 24 | End:: 2009-07-04 |
paul@20 | 25 | }}} |
paul@20 | 26 | |
paul@20 | 27 | == Showing Event Calendars == |
paul@20 | 28 | |
paul@20 | 29 | To show a calendar, use the !EventAggregator macro with a list of event categories. For example: |
paul@20 | 30 | |
paul@20 | 31 | {{{ |
paul@20 | 32 | ## Show Events and Training categories. |
paul@20 | 33 | <<EventAggregator(CategoryEvents,CategoryTraining)>> |
paul@20 | 34 | }}} |
paul@20 | 35 | |
paul@20 | 36 | The calendar, shown by default, is automatically filled out with the details of each event in the specified category (or categories), colouring each event period in an automatically generated colour. |
paul@20 | 37 | |
paul@20 | 38 | Specific periods can be defined using the `start` and `end` parameters. For example: |
paul@20 | 39 | |
paul@20 | 40 | {{{ |
paul@20 | 41 | ## Show June and July 2009. |
paul@20 | 42 | <<EventAggregator(CategoryEvents,start=2009-06,end=2009-07)>> |
paul@20 | 43 | }}} |
paul@20 | 44 | |
paul@20 | 45 | By using specific month values, a fixed window of time can be presented, displaying only events occurring within that period. It is possible to omit `start` or `end` in order to show all events up to (by omitting `start`) or starting from (by omitting `end`) a particular month. |
paul@20 | 46 | |
paul@20 | 47 | There are special values which are significant. The `current` value refers to the current month and can be used with the minus and plus operators to refer, respectively, to months before and after the current month: |
paul@20 | 48 | |
paul@20 | 49 | {{{ |
paul@20 | 50 | ## Show this and next month. |
paul@20 | 51 | <<EventAggregator(CategoryEvents,start=current,end=current+1)>> |
paul@20 | 52 | ## Show this and last month. |
paul@20 | 53 | <<EventAggregator(CategoryEvents,start=current-1,end=current)>> |
paul@20 | 54 | }}} |
paul@20 | 55 | |
paul@20 | 56 | In addition, the `yearstart` and `yearend` values refer to the first and last months of the current year: |
paul@20 | 57 | |
paul@20 | 58 | {{{ |
paul@20 | 59 | ## Show this year's events. |
paul@20 | 60 | <<EventAggregator(CategoryEvents,start=yearstart,end=yearend)>> |
paul@20 | 61 | ## Show events from last December to next January. |
paul@20 | 62 | <<EventAggregator(CategoryEvents,start=yearstart-1,end=yearend+1)>> |
paul@20 | 63 | }}} |
paul@20 | 64 | |
paul@20 | 65 | == Showing Event Lists == |
paul@20 | 66 | |
paul@20 | 67 | A more plain view of events can be displayed by specifying the `mode` parameter as follows: |
paul@20 | 68 | |
paul@20 | 69 | {{{ |
paul@20 | 70 | <<EventAggregator(CategoryEvents,mode=list)>> |
paul@20 | 71 | }}} |
paul@20 | 72 | |
paul@20 | 73 | The `list` value causes a list view to be employed; the `calendar` value causes the default calendar view to be employed. |