EventAggregator

pages/HelpOnEventAggregator

60:7d7a4577ceb1
2009-11-07 Paul Boddie Incorporated changes to the RSS feed which enhance the title, link and description of each feed to refer to the page which provided it, as well as a change in the ordering of events in a feed, placing the latest events (in terms of the event start date) first.
     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. The following action can be used to create a new event page (using !EventAggregatorNewEvent):    17     18 (!) <<Action(EventAggregatorNewEvent,Add an event)>>    19     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):    21     22 <<NewPage(EventTemplate,Add an event page)>>    23     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:    25     26 {{{    27  Start:: 2009-06-28    28  End:: 2009-07-04    29 }}}    30     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:    32     33 {{{    34  Start:: Sunday 28th June 2009 (2009-06-28)    35  End:: Saturday 4th July 2009 (2009-07-04)    36 }}}    37     38 Obviously, duplicating the date information introduces a risk of this information becoming inconsistent, so beware!    39     40 === Supported Event Properties ===    41     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:    43     44  Title:: the preferred name of the event in the calendar    45  Summary:: a synonym for title    46  Topics:: a list of topics related to the event - use a comma (`,`) to separate topic names    47  Categories:: a synonym for topics - note that this means "event categories", not "page categories" which are a distinct concept    48  Location:: the location of the event    49     50 These properties may be incorporated into representations or summaries of events.    51     52 Textual properties can be quoted in a limited way using the verbatim or monospaced text Wiki syntax. For example:    53     54 {{{    55  Summary:: <<Verbatim(EuroPython)>> 2009    56  Topics:: Python, <<Verbatim(EuroPython)>>, Zope    57 }}}    58     59 == Showing Event Calendars ==    60     61 To show a calendar, use the !EventAggregator macro with a list of event categories. For example:    62     63 {{{    64 ## Show Events and Training categories.    65 <<EventAggregator(CategoryEvents,CategoryTraining)>>    66 }}}    67     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.    69     70 Specific periods can be defined using the `start` and `end` parameters. For example:    71     72 {{{    73 ## Show June and July 2009.    74 <<EventAggregator(CategoryEvents,start=2009-06,end=2009-07)>>    75 }}}    76     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.    78     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:    80     81 {{{    82 ## Show this and next month.    83 <<EventAggregator(CategoryEvents,start=current,end=current+1)>>    84 ## Show this and last month.    85 <<EventAggregator(CategoryEvents,start=current-1,end=current)>>    86 }}}    87     88 In addition, the `yearstart` and `yearend` values refer to the first and last months of the current year:    89     90 {{{    91 ## Show this year's events.    92 <<EventAggregator(CategoryEvents,start=yearstart,end=yearend)>>    93 ## Show events from last December to next January.    94 <<EventAggregator(CategoryEvents,start=yearstart-1,end=yearend+1)>>    95 }}}    96     97 === Event Naming ===    98     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:   100    101 {{{   102 ## Show the name on every day.   103 <<EventAggregator(CategoryEvents,names=daily)>>   104 ## Show the name once per week.   105 <<EventAggregator(CategoryEvents,names=weekly)>>   106 }}}   107    108 === Navigation Controls ===   109    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:   111    112 {{{   113 ## Provide a navigable calendar.   114 <<EventAggregator(CategoryEvents,start=current,end=current,calendar=monthly)>>   115 }}}   116    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.   118    119 === Assigning Templates and Parent Pages ===   120    121 New events can be added to a calendar by following the links on each of the day numbers; this opens the form provided by the !EventAggregatorNewEvent action. For all events belonging to a particular calendar, it can be convenient to assign a default template page, so that the information provided by such events is consistent. Thus, it is possible to specify such a template page using the `template` parameter. For example:   122    123 {{{   124 ## Specify a particular template page as the default event page template.   125 <<EventAggregator(CategoryEvents,template=SpecialEventTemplate)>>   126 }}}   127    128 It can also be convenient to add new event pages under a common parent page. This can be achieved by specifying such a page using the `parent` parameter. For example:   129    130 {{{   131 ## Specify a particular parent page as the default container for new events.   132 <<EventAggregator(CategoryEvents,parent=Events)>>   133 }}}   134    135 Creating an event called '''Meeting''' under a parent called '''Events''' will make the page '''Events/Meeting''', and this will be shown as '''Meeting''' in the calendar. However, if a different parent is chosen, such as '''Meetings''', then the full path to the page will be shown in the calendar: '''Meetings ? Meeting'''.   136    137 == Showing Event Lists and Tables ==   138    139 A more plain view of events can be displayed by specifying the `mode` parameter as follows:   140    141 {{{   142 <<EventAggregator(CategoryEvents,mode=list)>>   143 }}}   144    145 The `list` value causes a list view to be employed.   146    147 Another alternative view can be chosen by specifying the `mode` parameter with a value of `table` as in the following example:   148    149 {{{   150 <<EventAggregator(CategoryEvents,mode=table)>>   151 }}}   152    153 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:   154    155  * `conference` - using the `event-table-category-conference` style   156  * `special` - using the `event-table-category-special` style   157  * `training` - using the `event-table-category-training` style   158    159 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.   160    161 === Note ===   162    163 The `calendar` value causes the default calendar view to be employed.   164    165 == See Also ==   166    167  * HelpOnEventAggregatorNewEvent - an action providing a form for creating new events conveniently   168  * HelpOnEventAggregatorSummary - an action producing iCalendar event summaries