PagelistParameterVariables

Test the usage of PageLists variables? as parameters

Specifying variables as parameters

You can also specify variable values inline with the pagelist statement, and refer to the variables in the template using the {$$variable1} format:

(:pagelist fmt=#pagelist variable1="value" variable2="value2":)

This assumes that a site has $EnableRelativePageVars enabled, which is recommended in PmWiki 2.2.0 -- but disabled by default to help people upgrading from 2.1.x.

Test with one parameter
>>comment<<
[[#tvars]]
(:template default count=1:)
Hi, {$$Name}, how are you today?
[[#tvarsend]]
>><<

(:pagelist fmt=#tvars Name=Sam:)

(:pagelist fmt=#tvars Name="Sally S":)

(:template default count=1:) Hi, {$$Name}, how are you today?

Hi, Sam, how are you today?

Hi, Sally S, how are you today?

Test with two parameters
>>comment<<
[[#tvars2]]
(:template default count=1:)
Hi, {$$Name1}, how are you today?
-> I'm fine thanks {$$Name2}
[[#tvars2end]]
>><<

(:pagelist fmt=#tvars2 Name1=Sam Name2="Pam P":)

(:pagelist fmt=#tvars2 Name1=Sally Name2="Harry H":)

(:template default count=1:) Hi, {$$Name1}, how are you today?

I'm fine thanks {$$Name2}

Hi, Sam, how are you today?

I'm fine thanks Pam P

Hi, Sally, how are you today?

I'm fine thanks Harry H
Test with one parameter default
>>comment<<
[[#tvars3]]
(:template default count=1 Name='anonymous':)
Hi, {$$Name}, how are you today?
[[#tvar3send]]
>><<

(:pagelist fmt=#tvars3 :)

(:pagelist fmt=#tvars3 Name=Sally:)

(:template default count=1 Name='anonymous':) Hi, {$$Name}, how are you today?

Hi, anonymous, how are you today?

Hi, Sally, how are you today?

  0: 00.00 00.00 config start
  1: 00.01 00.01 config end
  2: 00.12 00.11 MarkupToHTML begin
  3: 00.12 00.11 MarkupToHTML begin
  4: 00.12 00.12 FPLTemplate: Chain begin
  5: 00.12 00.12 FPLTemplate: FPLTemplateLoad
  6: 00.13 00.12 FPLTemplate: FPLTemplateDefaults
  7: 00.13 00.12 FPLTemplate: FPLTemplatePageList
  8: 00.13 00.12 MakePageList pre
  9: 00.13 00.12 PageListSources begin
 10: 00.13 00.12 PageStore::ls begin wiki.d/{$FullName}
 11: 00.13 00.12 PageStore::ls merge wiki.d/{$FullName}
 12: 00.14 00.13 PageStore::ls end wiki.d/{$FullName}
 13: 00.14 00.13 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 14: 00.14 00.13 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 15: 00.14 00.13 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 16: 00.15 00.14 PageListSources end count=10153
 17: 00.15 00.14 PageListSort pre ret=4 order=name
 18: 00.15 00.14 MakePageList items count=10153, filters=
 19: 00.16 00.15 MakePageList post count=10153, readc=0
 20: 00.16 00.15 PageListSort begin
 21: 00.16 00.15 PageListSort sort
 22: 00.29 00.28 PageListSort end
 23: 00.29 00.28 MakePageList end
 24: 00.29 00.28 FPLTemplate: FPLTemplatePmWikiOrg
 25: 00.30 00.28 MarkupToHTML begin
 26: 00.30 00.28 MarkupToHTML end
 27: 00.30 00.28 FPLTemplate: FPLTemplateSliceList
 28: 00.30 00.28 FPLTemplate: FPLTemplateFormat
 29: 00.30 00.28 MarkupToHTML begin
 30: 00.30 00.29 MarkupToHTML end
 31: 00.30 00.29 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 32: 00.30 00.29 FPLTemplate: Chain end
 33: 00.30 00.29 FPLTemplate: Chain begin
 34: 00.30 00.29 FPLTemplate: FPLTemplateLoad
 35: 00.30 00.29 FPLTemplate: FPLTemplateDefaults
 36: 00.30 00.29 FPLTemplate: FPLTemplatePageList
 37: 00.30 00.29 MakePageList pre
 38: 00.30 00.29 PageListSources begin
 39: 00.30 00.29 PageStore::ls begin wiki.d/{$FullName}
 40: 00.31 00.29 PageStore::ls merge wiki.d/{$FullName}
 41: 00.31 00.30 PageStore::ls end wiki.d/{$FullName}
 42: 00.32 00.30 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 43: 00.32 00.30 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 44: 00.32 00.30 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 45: 00.32 00.31 PageListSources end count=10153
 46: 00.32 00.31 PageListSort pre ret=4 order=name
 47: 00.32 00.31 MakePageList items count=10153, filters=
 48: 00.33 00.31 MakePageList post count=10153, readc=0
 49: 00.33 00.31 PageListSort begin
 50: 00.33 00.31 PageListSort sort
 51: 00.48 00.45 PageListSort end
 52: 00.48 00.45 MakePageList end
 53: 00.48 00.46 FPLTemplate: FPLTemplatePmWikiOrg
 54: 00.48 00.46 MarkupToHTML begin
 55: 00.48 00.46 MarkupToHTML end
 56: 00.48 00.46 FPLTemplate: FPLTemplateSliceList
 57: 00.48 00.46 FPLTemplate: FPLTemplateFormat
 58: 00.48 00.46 MarkupToHTML begin
 59: 00.48 00.46 MarkupToHTML end
 60: 00.48 00.46 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 61: 00.48 00.46 FPLTemplate: Chain end
 62: 00.48 00.46 MarkupToHTML end
 63: 00.48 00.46 MarkupToHTML begin
 64: 00.49 00.47 FPLTemplate: Chain begin
 65: 00.49 00.47 FPLTemplate: FPLTemplateLoad
 66: 00.49 00.47 FPLTemplate: FPLTemplateDefaults
 67: 00.49 00.47 FPLTemplate: FPLTemplatePageList
 68: 00.49 00.47 MakePageList pre
 69: 00.49 00.47 PageListSources begin
 70: 00.49 00.47 PageStore::ls begin wiki.d/{$FullName}
 71: 00.49 00.47 PageStore::ls merge wiki.d/{$FullName}
 72: 00.50 00.47 PageStore::ls end wiki.d/{$FullName}
 73: 00.50 00.48 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 74: 00.50 00.48 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 75: 00.50 00.48 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 76: 00.51 00.48 PageListSources end count=10153
 77: 00.51 00.48 PageListSort pre ret=4 order=name
 78: 00.51 00.48 MakePageList items count=10153, filters=
 79: 00.52 00.49 MakePageList post count=10153, readc=0
 80: 00.52 00.49 PageListSort begin
 81: 00.52 00.49 PageListSort sort
 82: 00.66 00.63 PageListSort end
 83: 00.66 00.63 MakePageList end
 84: 00.67 00.63 FPLTemplate: FPLTemplatePmWikiOrg
 85: 00.67 00.64 MarkupToHTML begin
 86: 00.67 00.64 MarkupToHTML end
 87: 00.67 00.64 FPLTemplate: FPLTemplateSliceList
 88: 00.67 00.64 FPLTemplate: FPLTemplateFormat
 89: 00.67 00.64 MarkupToHTML begin
 90: 00.67 00.64 MarkupToHTML end
 91: 00.67 00.64 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 92: 00.67 00.64 FPLTemplate: Chain end
 93: 00.67 00.64 FPLTemplate: Chain begin
 94: 00.67 00.64 FPLTemplate: FPLTemplateLoad
 95: 00.67 00.64 FPLTemplate: FPLTemplateDefaults
 96: 00.67 00.64 FPLTemplate: FPLTemplatePageList
 97: 00.67 00.64 MakePageList pre
 98: 00.67 00.64 PageListSources begin
 99: 00.67 00.64 PageStore::ls begin wiki.d/{$FullName}
100: 00.68 00.64 PageStore::ls merge wiki.d/{$FullName}
101: 00.68 00.65 PageStore::ls end wiki.d/{$FullName}
102: 00.69 00.65 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
103: 00.69 00.65 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
104: 00.69 00.65 PageStore::ls end $FarmD/wikilib.d/{$FullName}
105: 00.69 00.66 PageListSources end count=10153
106: 00.69 00.66 PageListSort pre ret=4 order=name
107: 00.69 00.66 MakePageList items count=10153, filters=
108: 00.70 00.67 MakePageList post count=10153, readc=0
109: 00.70 00.67 PageListSort begin
110: 00.70 00.67 PageListSort sort
111: 00.85 00.81 PageListSort end
112: 00.85 00.81 MakePageList end
113: 00.85 00.81 FPLTemplate: FPLTemplatePmWikiOrg
114: 00.85 00.81 MarkupToHTML begin
115: 00.85 00.81 MarkupToHTML end
116: 00.85 00.81 FPLTemplate: FPLTemplateSliceList
117: 00.85 00.81 FPLTemplate: FPLTemplateFormat
118: 00.85 00.81 MarkupToHTML begin
119: 00.85 00.82 MarkupToHTML end
120: 00.85 00.82 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
121: 00.85 00.82 FPLTemplate: Chain end
122: 00.85 00.82 MarkupToHTML end
123: 00.85 00.82 MarkupToHTML begin
124: 00.86 00.82 FPLTemplate: Chain begin
125: 00.86 00.82 FPLTemplate: FPLTemplateLoad
126: 00.86 00.82 FPLTemplate: FPLTemplateDefaults
127: 00.86 00.82 FPLTemplate: FPLTemplatePageList
128: 00.86 00.82 MakePageList pre
129: 00.86 00.82 PageListSources begin
130: 00.86 00.82 PageStore::ls begin wiki.d/{$FullName}
131: 00.86 00.82 PageStore::ls merge wiki.d/{$FullName}
132: 00.87 00.83 PageStore::ls end wiki.d/{$FullName}
133: 00.87 00.83 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
134: 00.87 00.83 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
135: 00.87 00.83 PageStore::ls end $FarmD/wikilib.d/{$FullName}
136: 00.88 00.84 PageListSources end count=10153
137: 00.88 00.84 PageListSort pre ret=4 order=name
138: 00.88 00.84 MakePageList items count=10153, filters=
139: 00.88 00.84 MakePageList post count=10153, readc=0
140: 00.88 00.84 PageListSort begin
141: 00.88 00.84 PageListSort sort
142: 01.04 01.00 PageListSort end
143: 01.04 01.00 MakePageList end
144: 01.05 01.00 FPLTemplate: FPLTemplatePmWikiOrg
145: 01.05 01.00 MarkupToHTML begin
146: 01.05 01.00 MarkupToHTML end
147: 01.05 01.00 FPLTemplate: FPLTemplateSliceList
148: 01.05 01.00 FPLTemplate: FPLTemplateFormat
149: 01.05 01.00 MarkupToHTML begin
150: 01.05 01.01 MarkupToHTML end
151: 01.05 01.01 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
152: 01.05 01.01 FPLTemplate: Chain end
153: 01.05 01.01 FPLTemplate: Chain begin
154: 01.05 01.01 FPLTemplate: FPLTemplateLoad
155: 01.05 01.01 FPLTemplate: FPLTemplateDefaults
156: 01.05 01.01 FPLTemplate: FPLTemplatePageList
157: 01.05 01.01 MakePageList pre
158: 01.05 01.01 PageListSources begin
159: 01.05 01.01 PageStore::ls begin wiki.d/{$FullName}
160: 01.06 01.01 PageStore::ls merge wiki.d/{$FullName}
161: 01.06 01.01 PageStore::ls end wiki.d/{$FullName}
162: 01.07 01.02 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
163: 01.07 01.02 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
164: 01.07 01.02 PageStore::ls end $FarmD/wikilib.d/{$FullName}
165: 01.07 01.02 PageListSources end count=10153
166: 01.07 01.02 PageListSort pre ret=4 order=name
167: 01.07 01.02 MakePageList items count=10153, filters=
168: 01.08 01.03 MakePageList post count=10153, readc=0
169: 01.08 01.03 PageListSort begin
170: 01.08 01.03 PageListSort sort
171: 01.22 01.16 PageListSort end
172: 01.22 01.16 MakePageList end
173: 01.23 01.17 FPLTemplate: FPLTemplatePmWikiOrg
174: 01.23 01.17 MarkupToHTML begin
175: 01.23 01.17 MarkupToHTML end
176: 01.23 01.17 FPLTemplate: FPLTemplateSliceList
177: 01.23 01.17 FPLTemplate: FPLTemplateFormat
178: 01.23 01.17 MarkupToHTML begin
179: 01.23 01.17 MarkupToHTML end
180: 01.23 01.17 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
181: 01.23 01.17 FPLTemplate: Chain end
182: 01.23 01.17 MarkupToHTML end
183: 01.26 01.19 MarkupToHTML end
184: 01.26 01.20 MarkupToHTML begin
185: 01.27 01.20 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
186: 01.27 01.21 ReadApprovedUrls SiteAdmin.ApprovedUrls end
187: 01.28 01.21 MarkupToHTML end
188: 01.28 01.21 MarkupToHTML begin
189: 01.28 01.22 MarkupToHTML end
190: 01.28 01.22 now
Peak memory: 10,539,920 bytes