Item1841: CalendarPlugin does not allow SEARCH results as event list
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
The
CalendarPlugin does not allow
SEARCH results as the event list.
You can
INCLUDE topics with hard-coded event information, but if you try to build the event information using
SEARCH, the information will appear correctly on the page of events, but it will not be incorporated into the resulting calendar, regardless of format.
I looked into this a while back (probably over a year ago) and verified that the
CalendarPlugin does not use the normal page building facilities and uses its own
INCLUDE infrastructure. I tried to add in the evaluation of
SEARCH using the conventional method, and disabled the
INCLUDE code specific to the
CalendarPlugin. However, this resulted in cases when INCLUDES would infinite loop, so I backed the hack out. Since then, I imagine things have changed in the structure of what should be called.
I want to do this because we maintain events in separate topics that include
DataForms that specify the date, time, venue, etc. of the event. I want to be able to automatically include those events in the calendar without the manual step of encoding a hardcoded entry that can be
INCLUDE-ed.
For sake of explanation, here is the search I am using:
%SEARCH{search="form.name='PromoForm'" web="Events" nonoise="on" type="query" nosearch="on" format=" * $percntDATETIME{\"$day $month $year\" date=\"$formfield(Date)\"}$percnt - $formfield(Title) -- $formfield(Program) $formfield(Venue) ($formfield(EventTime)) [[$web.$topic][Detail...]]" order="formfield(Date)" reverse="on" excludetopic="EventTopicTemplate"}%
And the events are produced for the event list correctly, but they are never incorporated into the calendar because the
CalendarPlugin inspects the topic directly, and therefore sees the
SEARCH code before it is expanded.
Had to fix this to support calendars generated by external agencies.
--
CrawfordCurrie - 30 Jun 2010