Page heading
This templated markup is used in the following pages to transclude selected trips from the main monthly fixture card pages to interest specific fixture card pages.
- Climbing and alpine Scheduled climbing and mountaineering trips
- Cycling trips Fixture Card for Cycling trips
- Multi-day Fixture Card multi-day trips and expeditions
- Snow and Lodge trips Fixture Card for Board, Ski, Snow, and Tararua Lodge trips
The markup uses a page text variable defined on the specific page as (:pattern:regex:) and used as {$:pattern} to select the specific lines to be displayed.
The "regex" contains the 'keywords' from the trip type (or in fact anywhere on the tip's line) that enable that tip to be transcluded into the specific fixture card page. Regex is an abbreviation for regular expressions.
Copy this text
(:include Site.TemplateFixtureCardInclude#include#includeend basepage='':)
to create a new fixture card page for a specific trip type.
Define (:pattern:regex:) and if necessary (:columnname:text:) on the specific trip type page.
(:endday:number:) defaults to 7.
The parameter 'month="all"' is supplied for the youth pages.
[[#include]]
||class=fixturetable width=* max-width=80pct
||!Date ||!Location ||![[TripInformation/TripGrading|Grade]] ||![[TripInformation/LeadershipKit|Leader]] ||![[TTC/Contacts|Contact]] ||!{$:columnname} ||
(:if044 date {$ThisYear}-01-01..{$ThisYear}-02-{$:endday}:)
||![[FixtureCard/January]] ||||||||||||
(:grep FixtureCard/{$ThisYear}January pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if044end:)
(:if045 date {$ThisYear}-01-01..{$ThisYear}-03-{$:endday}:)
||![[FixtureCard/February]] ||||||||||||
(:grep FixtureCard/{$ThisYear}February pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if045end:)
(:if046 date {$ThisYear}-01-01..{$ThisYear}-04-{$:endday}:)
||![[FixtureCard/March]] ||||||||||||
(:grep FixtureCard/{$ThisYear}March pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if046end:)
(:if047 date {$ThisYear}-01-01..{$ThisYear}-05-{$:endday}:)
||![[FixtureCard/April]] ||||||||||||
(:grep FixtureCard/{$ThisYear}April pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if047end:)
(:if048 date {$ThisYear}-01-01..{$ThisYear}-06-{$:endday}:)
||![[FixtureCard/May]] ||||||||||||
(:grep FixtureCard/{$ThisYear}May pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if048end:)
(:if049 date {$ThisYear}-01-01..{$ThisYear}-07-{$:endday}:)
||![[FixtureCard/June]] ||||||||||||
(:grep FixtureCard/{$ThisYear}June pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if049end:)
(:if050 expr equal "{$$month}" "all" OR date {$ThisYear}-06-01..{$ThisYear}-07-{$:endday}:)
||![[FixtureCard/July]] ||||||||||||
(:grep FixtureCard/{$ThisYear}July pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if050end:)
(:if051 expr equal "{$$month}" "all" OR date {$ThisYear}-06-01..{$ThisYear}-08-{$:endday}:)
||![[FixtureCard/August]] ||||||||||||
(:grep FixtureCard/{$ThisYear}August pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if051end:)
(:if052 expr equal "{$$month}" "all" OR date {$ThisYear}-06-01..{$ThisYear}-09-{$:endday}:)
||![[FixtureCard/September]] ||||||||||||
(:grep FixtureCard/{$ThisYear}September pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if052end:)
(:if053 expr equal "{$$month}" "all" OR date {$ThisYear}-06-01..{$ThisYear}-10-{$:endday}:)
||![[FixtureCard/October]] ||||||||||||
(:grep FixtureCard/{$ThisYear}October pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if053end:)
(:if054 expr equal "{$$month}" "all" OR date {$ThisYear}-06-01..{$ThisYear}-11-{$:endday}:)
||![[FixtureCard/November]] ||||||||||||
(:grep FixtureCard/{$ThisYear}November pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if054end:)
(:if055 expr equal "{$$month}" "all" OR date {$ThisYear}-06-01..{$ThisYear}-12-{$:endday}:)
||![[FixtureCard/December]] ||||||||||||
(:grep FixtureCard/{$ThisYear}December pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if055end:)
(:if057 date {$ThisYear}-11-14..{$ThisYear}-12-31:)
||![[FixtureCard/{$NextYear} January]] {$NextYear} ||||||||||||
(:grep FixtureCard/{$NextYear}January pat={$:pattern} mod=im match=1:)
||! ||||||||||||
||![[FixtureCard/{$NextYear} February]] {$NextYear} ||||||||||||
(:grep FixtureCard/{$NextYear}February pat={$:pattern} mod=im match=1:)
||! ||||||||||||
||![[FixtureCard/{$NextYear} March]] {$NextYear} ||||||||||||
(:grep FixtureCard/{$NextYear}March pat={$:pattern} mod=im match=1:)
||! ||||||||||||
||![[FixtureCard/{$NextYear} April]] {$NextYear} ||||||||||||
(:grep FixtureCard/{$NextYear}April pat={$:pattern} mod=im match=1:)
||! ||||||||||||
||![[FixtureCard/{$NextYear} May]] {$NextYear} ||||||||||||
(:grep FixtureCard/{$NextYear}May pat={$:pattern} mod=im match=1:)
||! ||||||||||||
||![[FixtureCard/{$NextYear} June]] {$NextYear} ||||||||||||
(:grep FixtureCard/{$NextYear}June pat={$:pattern} mod=im match=1:)
||! ||||||||||||
(:if057end:)
[[#includeend]]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example
These variables are used in the markup example above
(:endday:07:) (:columnname:[[TararuaLodge/VisitingTheLodge|Bookings]]:) (:pattern:'^(?!.*(Weekend trips in|Saturday and Sunday trips in|Multi-day trips in).*)\|\|.*(?:ski|climb|lodge|bike|biking|cycle|cycling|mtb|[^!]multi|[2-9] day|overnight|weekend|week|expedition).*$':) |
This pattern excludes lines with the texts "Weekend trips in", "Saturday and Sunday trips in", "Multi-day trips in" and includes the lines with the other strings, e.g. "cycling", "weekend", "2 day", etc.
