1 ##master-page:HelpTemplate 2 ##master-date:Unknown-Date 3 #format wiki 4 #language en 5 6 == EventAggregator == 7 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). 9 10 == Creating Events == 11 12 Before creating any events, create a category for those events. You can do this by filling out and submitting this form: 13 14 <<NewPage(CategoryTemplate,Add a new category,,Category%s)>> 15 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: 17 18 <<NewPage(EventTemplate,Add an event)>> 19 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: 21 22 {{{ 23 Start:: 2009-06-28 24 End:: 2009-07-04 25 }}} 26 27 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: 28 29 {{{ 30 Start:: Sunday 28th June 2009 (2009-06-28) 31 End:: Saturday 4th July 2009 (2009-07-04) 32 }}} 33 34 Obviously, duplicating the date information introduces a risk of this information becoming inconsistent, so beware! 35 36 === Supported Event Properties === 37 38 As well as the start and end dates of an event, the following properties are also recognised as being part of an event description: 39 40 Title:: the preferred name of the event in the calendar 41 Summary:: a synonym for title 42 Topics:: a list of topics related to the event - use a comma (`,`) to separate topic names 43 Categories:: a synonym for topics 44 Location:: the location of the event 45 46 These properties may be incorporated into representations or summaries of events. 47 48 Textual properties can be quoted in a limited way using the verbatim or monospaced text Wiki syntax. For example: 49 50 {{{ 51 Summary:: <<Verbatim(EuroPython)>> 2009 52 Topics:: Python, <<Verbatim(EuroPython)>>, Zope 53 }}} 54 55 == Showing Event Calendars == 56 57 To show a calendar, use the !EventAggregator macro with a list of event categories. For example: 58 59 {{{ 60 ## Show Events and Training categories. 61 <<EventAggregator(CategoryEvents,CategoryTraining)>> 62 }}} 63 64 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. 65 66 Specific periods can be defined using the `start` and `end` parameters. For example: 67 68 {{{ 69 ## Show June and July 2009. 70 <<EventAggregator(CategoryEvents,start=2009-06,end=2009-07)>> 71 }}} 72 73 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. 74 75 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: 76 77 {{{ 78 ## Show this and next month. 79 <<EventAggregator(CategoryEvents,start=current,end=current+1)>> 80 ## Show this and last month. 81 <<EventAggregator(CategoryEvents,start=current-1,end=current)>> 82 }}} 83 84 In addition, the `yearstart` and `yearend` values refer to the first and last months of the current year: 85 86 {{{ 87 ## Show this year's events. 88 <<EventAggregator(CategoryEvents,start=yearstart,end=yearend)>> 89 ## Show events from last December to next January. 90 <<EventAggregator(CategoryEvents,start=yearstart-1,end=yearend+1)>> 91 }}} 92 93 === Event Naming === 94 95 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: 96 97 {{{ 98 ## Show the name on every day. 99 <<EventAggregator(CategoryEvents,names=daily)>> 100 ## Show the name once per week. 101 <<EventAggregator(CategoryEvents,names=weekly)>> 102 }}} 103 104 === Navigation Controls === 105 106 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: 107 108 {{{ 109 ## Provide a navigable calendar. 110 <<EventAggregator(CategoryEvents,start=current,end=current,calendar=monthly)>> 111 }}} 112 113 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. 114 115 == Showing Event Lists == 116 117 A more plain view of events can be displayed by specifying the `mode` parameter as follows: 118 119 {{{ 120 <<EventAggregator(CategoryEvents,mode=list)>> 121 }}} 122 123 The `list` value causes a list view to be employed; the `calendar` value causes the default calendar view to be employed. 124 125 == See Also == 126 127 * HelpOnEventAggregatorSummary - an action producing iCalendar event summaries