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@47 | 16 | Each event must be created on a new page belonging to the appropriate event category. The following action can be used to create a new event page (using !EventAggregatorNewEvent): |
paul@47 | 17 | |
paul@47 | 18 | (!) <<Action(EventAggregatorNewEvent,Add an event)>> |
paul@20 | 19 | |
paul@47 | 20 | Since each event is represented by a page, creating a new page based on an appropriate template is also sufficient. For pages belonging to CategoryEvents, you can do this by filling out and submitting this form (which uses EventTemplate): |
paul@47 | 21 | |
paul@47 | 22 | <<NewPage(EventTemplate,Add an event page)>> |
paul@20 | 23 | |
paul@20 | 24 | 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 | 25 | |
paul@20 | 26 | {{{ |
paul@20 | 27 | Start:: 2009-06-28 |
paul@20 | 28 | End:: 2009-07-04 |
paul@20 | 29 | }}} |
paul@20 | 30 | |
paul@21 | 31 | You can add text which is more readable for humans provided that the `YYYY-MM-DD` format values are present somewhere in each entry. For example: |
paul@21 | 32 | |
paul@21 | 33 | {{{ |
paul@21 | 34 | Start:: Sunday 28th June 2009 (2009-06-28) |
paul@21 | 35 | End:: Saturday 4th July 2009 (2009-07-04) |
paul@21 | 36 | }}} |
paul@21 | 37 | |
paul@21 | 38 | Obviously, duplicating the date information introduces a risk of this information becoming inconsistent, so beware! |
paul@21 | 39 | |
paul@24 | 40 | === Supported Event Properties === |
paul@24 | 41 | |
paul@24 | 42 | As well as the start and end dates of an event, the following properties are also recognised as being part of an event description: |
paul@24 | 43 | |
paul@24 | 44 | Title:: the preferred name of the event in the calendar |
paul@24 | 45 | Summary:: a synonym for title |
paul@24 | 46 | Topics:: a list of topics related to the event - use a comma (`,`) to separate topic names |
paul@51 | 47 | Categories:: a synonym for topics - note that this means "event categories", not "page categories" which are a distinct concept |
paul@24 | 48 | Location:: the location of the event |
paul@24 | 49 | |
paul@24 | 50 | These properties may be incorporated into representations or summaries of events. |
paul@24 | 51 | |
paul@24 | 52 | Textual properties can be quoted in a limited way using the verbatim or monospaced text Wiki syntax. For example: |
paul@24 | 53 | |
paul@24 | 54 | {{{ |
paul@24 | 55 | Summary:: <<Verbatim(EuroPython)>> 2009 |
paul@24 | 56 | Topics:: Python, <<Verbatim(EuroPython)>>, Zope |
paul@24 | 57 | }}} |
paul@24 | 58 | |
paul@20 | 59 | == Showing Event Calendars == |
paul@20 | 60 | |
paul@20 | 61 | To show a calendar, use the !EventAggregator macro with a list of event categories. For example: |
paul@20 | 62 | |
paul@20 | 63 | {{{ |
paul@20 | 64 | ## Show Events and Training categories. |
paul@20 | 65 | <<EventAggregator(CategoryEvents,CategoryTraining)>> |
paul@20 | 66 | }}} |
paul@20 | 67 | |
paul@20 | 68 | 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 | 69 | |
paul@20 | 70 | Specific periods can be defined using the `start` and `end` parameters. For example: |
paul@20 | 71 | |
paul@20 | 72 | {{{ |
paul@20 | 73 | ## Show June and July 2009. |
paul@20 | 74 | <<EventAggregator(CategoryEvents,start=2009-06,end=2009-07)>> |
paul@20 | 75 | }}} |
paul@20 | 76 | |
paul@20 | 77 | 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 | 78 | |
paul@20 | 79 | 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 | 80 | |
paul@20 | 81 | {{{ |
paul@20 | 82 | ## Show this and next month. |
paul@20 | 83 | <<EventAggregator(CategoryEvents,start=current,end=current+1)>> |
paul@20 | 84 | ## Show this and last month. |
paul@20 | 85 | <<EventAggregator(CategoryEvents,start=current-1,end=current)>> |
paul@20 | 86 | }}} |
paul@20 | 87 | |
paul@20 | 88 | In addition, the `yearstart` and `yearend` values refer to the first and last months of the current year: |
paul@20 | 89 | |
paul@20 | 90 | {{{ |
paul@20 | 91 | ## Show this year's events. |
paul@20 | 92 | <<EventAggregator(CategoryEvents,start=yearstart,end=yearend)>> |
paul@20 | 93 | ## Show events from last December to next January. |
paul@20 | 94 | <<EventAggregator(CategoryEvents,start=yearstart-1,end=yearend+1)>> |
paul@20 | 95 | }}} |
paul@20 | 96 | |
paul@35 | 97 | === Event Naming === |
paul@35 | 98 | |
paul@35 | 99 | The default calendar view shows event names once per week. However, you can choose to show an event name on each day an event occurs: |
paul@35 | 100 | |
paul@35 | 101 | {{{ |
paul@35 | 102 | ## Show the name on every day. |
paul@35 | 103 | <<EventAggregator(CategoryEvents,names=daily)>> |
paul@35 | 104 | ## Show the name once per week. |
paul@35 | 105 | <<EventAggregator(CategoryEvents,names=weekly)>> |
paul@35 | 106 | }}} |
paul@35 | 107 | |
paul@35 | 108 | === Navigation Controls === |
paul@35 | 109 | |
paul@35 | 110 | The above examples have all provided fixed views of known events. However, a set of controls can be added to a calendar in order to let users navigate different time periods. This is done by providing a `calendar` parameter, indicating the name of the calendar, and by specifying a period of time: |
paul@35 | 111 | |
paul@35 | 112 | {{{ |
paul@35 | 113 | ## Provide a navigable calendar. |
paul@35 | 114 | <<EventAggregator(CategoryEvents,start=current,end=current,calendar=monthly)>> |
paul@35 | 115 | }}} |
paul@35 | 116 | |
paul@35 | 117 | Without any time period, the calendar would show all events, and there would be no real need to provide navigation, since there would be no events outside the displayed period to navigate to. It is possible to omit either the `start` or the `end` parameter and still provide navigation, however. |
paul@35 | 118 | |
paul@51 | 119 | == Showing Event Lists and Tables == |
paul@20 | 120 | |
paul@20 | 121 | A more plain view of events can be displayed by specifying the `mode` parameter as follows: |
paul@20 | 122 | |
paul@20 | 123 | {{{ |
paul@20 | 124 | <<EventAggregator(CategoryEvents,mode=list)>> |
paul@20 | 125 | }}} |
paul@20 | 126 | |
paul@51 | 127 | The `list` value causes a list view to be employed. |
paul@51 | 128 | |
paul@51 | 129 | Another alternative view can be chosen by specifying the `mode` parameter with a value of `table` as in the following example: |
paul@51 | 130 | |
paul@51 | 131 | {{{ |
paul@51 | 132 | <<EventAggregator(CategoryEvents,mode=table)>> |
paul@51 | 133 | }}} |
paul@51 | 134 | |
paul@51 | 135 | This collects all appropriate events into a single table, applying colouring to the cells belonging to a particular event based on that event's topic (or category) information. By default, only the following topics (or categories) cause cell colouring: |
paul@51 | 136 | |
paul@51 | 137 | * `conference` - using the `event-table-category-conference` style |
paul@51 | 138 | * `special` - using the `event-table-category-special` style |
paul@51 | 139 | * `training` - using the `event-table-category-training` style |
paul@51 | 140 | |
paul@51 | 141 | To define your own topic colours, edit the `event-aggregator.css` file which is provided with the !EventAggregator distribution, and then reinstall that file for each of the Wiki themes of interest. Topics involved in event colouring should be mutually exclusive: more than one such topic should not be specified for any given event. |
paul@51 | 142 | |
paul@51 | 143 | === Note === |
paul@51 | 144 | |
paul@51 | 145 | The `calendar` value causes the default calendar view to be employed. |
paul@24 | 146 | |
paul@24 | 147 | == See Also == |
paul@24 | 148 | |
paul@47 | 149 | * HelpOnEventAggregatorNewEvent - an action providing a form for creating new events conveniently |
paul@24 | 150 | * HelpOnEventAggregatorSummary - an action producing iCalendar event summaries |