Calendar and News Magic Tag Reference
Rather than using the clunky and inaccessible Javascript calendar/news schedule, there are now two magic tags that can be used which will fetch the information desired at render time. This will make your page load slightly slower than without, but shouldn't be noticably so.
In general, the usage is:
[sched–cal](URL of calendar page)[/sched-cal]
There are a number of parameters that can be passed to the tag to change the output, as detailed below. You add parameters within the opening tag, like this:
[sched–cal view=upcoming num=3]/fac/soc/department/calendarpage[/sched-cal]
[sched-cal] tag
| Parameter | Possible values | Default value | Description |
|---|---|---|---|
| view |
today|upcoming | today | Determines how to find the data. The "today" view gets all events for a certain number of days, whereas the upcoming view gets a certain number of upcoming events. |
| days | Number |
1 | Only with the today view Determines the number of days to look for. |
| num | Number | 5 | Only with the upcoming view Determines the number of upcoming events to display. |
| groupByDate | true|false | true | Determines whether to group events by date or to display the date before each event |
| spaceAfterDate | true|false | false† | Whether to add an extra line break after the date before the events on that date |
| showTags | true|false |
false |
Whether to show a list of tags after each event |
| ignoreBeforeToday | true|false | false |
If any multi-day events start before the current day, they will not be displayed if this is true. |
| link |
true|false | true | If set to true, the text of the event will be a link to a page describing that event |
| tags |
Comma-seperated string of tags |
(empty) | Allows the user to pass a comma-seperated list of tags to restrict the events by. Only events with the tags shown (or untagged) will be displayed. |
| regex | Regular expression |
(empty) | If this field is set, the first grouping in the regular expression will be the value that is displayed. Advanced users only. Please note - any square brackets in the expression must be escaped with a backslash. |
† spaceAfterDate is always true when the view is 'today' and days is 1
[sched-news] tag
| Parameter | Possible values | Default value | Description |
|---|---|---|---|
| num | Number | 5 | Determines the number of news items to display. |
| spaceAfterDate | true|false | false | Whether to add an extra line break after the date before the news items for that date |
| showTags | true|false |
false |
Whether to show a list of tags after each news item |
| link |
true|false | true | If set to true, the text of the news item will be a link to a page describing that item |
| tags |
Comma-seperated string of tags |
(empty) | Allows the user to pass a comma-seperated list of tags to restrict the news items by. Only items with the tags shown (or untagged) will be displayed. |
| regex | Regular expression |
(empty) | If this field is set, the first grouping in the regular expression will be the value that is displayed. Advanced users only. Please note - any square brackets in the expression must be escaped with a backslash. |
