Search:

Tararua Tramping Club

Te rōpū hikoi o te pae maunga o Tararua   -   Celebrating 100 years of tramping

Site Template Fixture Card Include Next

Including trips for the next week

This templated markup is used in the following pages to transclude selected trips from the main fixture card pages to the home page.
The pat(tern) is a regular expression.

Copy this text

(:include Site.TemplateFixtureCardIncludeNext#include#includeend:)

to create a list of the forthcoming trips.
It uses the page text variables from config.php {$ThisYear} "2024", {$ThisMonthName} "April".

{Site.TemplateFixtureCardIncludeNext$:pattern} = ""
%comment% create pattern for each day to be included
%comment% transcluded line has to start "||#␢" or "||##␢, optionally with "ddd␢" immediately after the "||"
%comment% the day number can optionally have a leading zero, but no leading spaces, and must be followed by a space (␢) or hyphen (-)
(:day0:'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?{(ftime fmt="%e" when="today")}[ ].*$':)
(:day1:'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?{(ftime fmt="%e" when="tomorrow")}[ ].*$':)
(:day2:'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?{(ftime fmt="%e" when="+2 days")}[ ].*$':)
(:day3:'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?{(ftime fmt="%e" when="+3 days")}[ ].*$':)
(:day4:'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?{(ftime fmt="%e" when="+4 days")}[ ].*$':)
(:day5:'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?{(ftime fmt="%e" when="+5 days")}[ ].*$':)
(:day6:'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?{(ftime fmt="%e" when="+6 days")}[ ].*$':)
(:day7:'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?{(ftime fmt="%e" when="+7 days")}[ ].*$':)
(:day8:'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?{(ftime fmt="%e" when="+8 days")}[ ].*$':)
%comment% create FixtureCard page name for each day to be included
(:yrmn1:{(ftime fmt="%Y%B" when="tomorrow")}:)
(:yrmn2:{(ftime fmt="%Y%B" when="+2 days)}:)
(:yrmn3:{(ftime fmt="%Y%B" when="+3 days)}:)
(:yrmn4:{(ftime fmt="%Y%B" when="+4 days)}:)
(:yrmn5:{(ftime fmt="%Y%B" when="+5 days)}:)
(:yrmn6:{(ftime fmt="%Y%B" when="+6 days)}:)
(:yrmn7:{(ftime fmt="%Y%B" when="+7 days)}:)
(:yrmn8:{(ftime fmt="%Y%B" when="+8 days)}:)

create pattern for each day to be included transcluded line has to start "||#␢" or "||##␢, optionally with "ddd␢" immediately after the "||" the day number can optionally have a leading zero, but no leading spaces, and must be followed by a space (␢) or hyphen (-) create FixtureCard page name for each day to be included

%comment% include one day at a time because trips are grouped by type on the fixture card page
[[#include]]
||class=fixturetable
||!Date ||!Location ||![[TripInformation/TripGrading|Grade]] ||![[TripInformation/LeadershipKit|Leader]] ||![[TTC/Contacts|Contact]] ||
(:grep FixtureCard/{$ThisYear}{$ThisMonthName}                  pat={Site.TemplateFixtureCardIncludeNext$:day0} mod=im match=1:)
(:grep FixtureCard/{Site.TemplateFixtureCardIncludeNext$:yrmn1} pat={Site.TemplateFixtureCardIncludeNext$:day1} mod=im match=1:)
(:grep FixtureCard/{Site.TemplateFixtureCardIncludeNext$:yrmn2} pat={Site.TemplateFixtureCardIncludeNext$:day2} mod=im match=1:)
(:grep FixtureCard/{Site.TemplateFixtureCardIncludeNext$:yrmn3} pat={Site.TemplateFixtureCardIncludeNext$:day3} mod=im match=1:)
(:grep FixtureCard/{Site.TemplateFixtureCardIncludeNext$:yrmn4} pat={Site.TemplateFixtureCardIncludeNext$:day4} mod=im match=1:)
(:grep FixtureCard/{Site.TemplateFixtureCardIncludeNext$:yrmn5} pat={Site.TemplateFixtureCardIncludeNext$:day5} mod=im match=1:)
(:grep FixtureCard/{Site.TemplateFixtureCardIncludeNext$:yrmn6} pat={Site.TemplateFixtureCardIncludeNext$:day6} mod=im match=1:)
(:grep FixtureCard/{Site.TemplateFixtureCardIncludeNext$:yrmn7} pat={Site.TemplateFixtureCardIncludeNext$:day7} mod=im match=1:)
(:grep FixtureCard/{Site.TemplateFixtureCardIncludeNext$:yrmn8} pat={Site.TemplateFixtureCardIncludeNext$:day8} mod=im match=1:)
[[#includeend]]

include one day at a time because trips are grouped by type on the fixture card page

DateLocationGradeLeaderContact
17East Harbour Regional ParkELiz Martin938 6311 or 021 135 6851
17Kaitoke Ridge Track variationEMMarg Pearce234 8191
17Dobson CircuitMPip Newton027 533 8778
17Wharekauhau Stream, North Saddle, 616MFFranz Hubmann027 857 1612
21 SunRata RidgeE/MMuriel Christianson04 479 5269
24Belmont Trig - Cannons HeadEMichele Dickson022 635 0193
24Simla Crescent figure of 8 via Totara ParkEMPenny Salmond021 211 2577
24Brooklyn tops, from South CoastMPaul Bruce021 02719370
24Farm CreekMFBill Allcock027 310 0263
24Overnight. Waerenga - North Saddle - Pt 830SFDavid McNabb027 436 0841
25 - 28 ANZACRuahine: Te HekengaMF multiSarah White022 165 0258
25 - 28 ANZACRuahine: Broken Ridge-SawtoothF multiKobus Boshoff021 566 079

(:include Site.TemplateFixtureCardIncludeNext#include#includeend:)

DateLocationGradeLeaderContact
17East Harbour Regional ParkELiz Martin938 6311 or 021 135 6851
17Kaitoke Ridge Track variationEMMarg Pearce234 8191
17Dobson CircuitMPip Newton027 533 8778
17Wharekauhau Stream, North Saddle, 616MFFranz Hubmann027 857 1612
21 SunRata RidgeE/MMuriel Christianson04 479 5269
24Belmont Trig - Cannons HeadEMichele Dickson022 635 0193
24Simla Crescent figure of 8 via Totara ParkEMPenny Salmond021 211 2577
24Brooklyn tops, from South CoastMPaul Bruce021 02719370
24Farm CreekMFBill Allcock027 310 0263
24Overnight. Waerenga - North Saddle - Pt 830SFDavid McNabb027 436 0841
25 - 28 ANZACRuahine: Te HekengaMF multiSarah White022 165 0258
25 - 28 ANZACRuahine: Broken Ridge-SawtoothF multiKobus Boshoff021 566 079
{Site/TemplateFixtureCardIncludeNext$:day0} = "'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?17[ ].*$'";
{Site/TemplateFixtureCardIncludeNext$:day1} = "'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?18[ ].*$'"; "2024April"
{Site/TemplateFixtureCardIncludeNext$:day2} = "'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?19[ ].*$'"; "2024April"
{Site/TemplateFixtureCardIncludeNext$:day3} = "'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?20[ ].*$'"; "2024April"
{Site/TemplateFixtureCardIncludeNext$:day4} = "'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?21[ ].*$'"; "2024April"
{Site/TemplateFixtureCardIncludeNext$:day5} = "'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?22[ ].*$'"; "2024April"
{Site/TemplateFixtureCardIncludeNext$:day6} = "'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?23[ ].*$'"; "2024April"
{Site/TemplateFixtureCardIncludeNext$:day7} = "'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?24[ ].*$'"; "2024April"
{Site/TemplateFixtureCardIncludeNext$:day8} = "'(?x)^\|\|(?:(?:Wed|Sat|Sun)[ -])?[0]?25[ ].*$'"; "2024April"
Category
Template

Page last modified on 2024 Apr 03 06:41

Edit - History - Recent changes - Wiki help - Search     About TTC     Contact us     About the website     Site map     email page as link -> mailto:?Subject="TTC: Template Fixture Card Include Next"&Body=