Wiki source for CalendarLinkActionInfo

Show raw source

=====Calendar Link Action Documentation=====
//not included in Wikka//

>>**See also**
Development: CalendarLinkAction
JwCalendarWithPageCreation>>This is the documentation page for the calendar link action.::c::


===Short description===
This action creates relations between pages belonging to the same calendar or displays the next or previous entry of a specified calendar. If provided with a date, it will use this as origin for the parameter link. If provided with an offset, this will first be added (haven't tried negative offsets yet) to date (if provided) or the current day (if parameter date is not provided). After this, the relation will take effect.

""<table cellspacing="0" cellpadding="2" border="1">
<tr><th scope="col">name</th><th scope="col">type</th><th scope="col">required?</th><th scope="col">default</th><th scope="col">description</th></tr>
<tr><td>calendarname</td><td>string</td><td>optional</td><td>current calendar or current user</td><td>The calendar base name on which to operate.</td></tr>
<tr><td>link</td><td>string</td><td>optional</td><td>next</td><td>This can be either 'next' (the default), 'prev', 'following', 'latest' or 'today', where 'next' and 'prev' work only correct if the action is on a calendar entry page, displaying the entry next or previous to the current entry, while 'following' and 'latest' use the current or calculated date and and shows the next upcoming or latest entry in the calendar.</td></tr>
<tr><td>date</td><td>integer</td><td>optional</td><td>current date</td><td>The relative origin for link mode</td></tr>
<tr><td>offset</td><td>integer</td><td>optional</td><td>0</td><td>Offset for date calculation [days]</td></tr>

===Long description===
//Place for a longer description.//

%%{{calendarlink [calendar="xxx"] [link="next|prev|following"] [date="yyyymmdd"] [offset="[number of days]"]}}%%

%%{{calendarlink calendar="ConCerts" link="following" date="20070601" offset="14"}}%%

with code from JavaWoman and DennyShimkoski

===To do===
~-Extend offset with the ability to accept other values than days or even mixed values like '4a2m2w3d' which should be read as 4 years, 2 month, 2 weeks and 3 days.
~-enabling negative or more complexoffset: '-4a+3m+2w-1d'
~-checking if 'next' and 'following', and 'prev' and 'latest' can be combined
~-code cleanup
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki