IncludeWithVariable

Test Include other pages with variable

Test the consistency of PmWiki variables when undefined, or defined with null and empty values. Also test the case sensitivity of variable names

[[#ivars]]
Hi, {$$Name}, how are you today? 
[[#ivarsend]]

Hi, {$$Name}, how are you today?

Then, including that section above (that section is available via the section {$FullName}#ivars) you get this type of behavior:

(:include {$FullName}#ivars Name=Sam:)

Hi, Sam, how are you today?

What is displayed when Name parameter not supplied?
(:include {$FullName}#ivars:)

Hi, , how are you today?

This result looks wrong, corrected 2.2.14
What is displayed when Name parameter value not supplied?
(:include {$FullName}#ivars Name=:)

Hi, , how are you today?

This result looks wrong, not corrected
What is displayed when Name parameter value is empty?
(:include {$FullName}#ivars Name='':)

Hi, , how are you today?

(:include {$FullName}#ivars name=cam:)

Hi, , how are you today?

This result looks wrong, corrected 2.2.14

Try something similar with page text variables

Avariable: v1
Bvariable:

Avariable: v1 Bvariable:

Avariable="{$:Avariable}"
Bvariable="{$:Bvariable}"
Cvariable="{$:Cvariable}"

Avariable="v1" Bvariable="" Cvariable=""

avariable="{$:avariable}"
bvariable="{$:bvariable}"
cvariable="{$:cvariable}"

avariable="" bvariable="" cvariable=""


Variables in page lists

>>comment<<
[[#pvars]]
(:template default count=1:)
Hi, {$$ParamName}, how are you today?
[[#pvarsend]]
>><<

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

This gives:

(:pagelist fmt=#pvars ParamName="Pam":)

Hi, Pam, how are you today?

(:pagelist fmt=#pvars ParamName=:)

Hi, , how are you today?

This result looks wrong, corrected 2.2.14
(:pagelist fmt=#pvars:)

Hi, , how are you today?

This result looks wrong, corrected 2.2.14
(:pagelist fmt=#pvars paramname="cam":)

Hi, , how are you today?

This result looks wrong, case insensitivity would be good

Try with Page Directives.

{$Titlespaced}

{$Description}

{$NoSuchVariable}

Include With Variable

{$titlespaced}

{$description}

{$nosuchvariable}

Escaped template variables?

[[#escaped]]
What happens with an [={$$EscapedVariable}=] ?
[[#escapedend]]
(:include {$FullName}#escaped:)
----
(:include {$FullName}#escaped EscapedVariable=:)
----
(:include {$FullName}#escaped EscapedVariable=Hello:)

What happens with an {$$EscapedVariable} ? What happens with an {$$EscapedVariable} ?


What happens with an {$$EscapedVariable} ?


What happens with an {$$EscapedVariable} ?

Conditional expression

[[#tplcond]]
(:if equal "{$$Who}" "Petko":)
%Py%''Petko'' Yotov
(:elseif equal "{$$Who}" "Pm":)
%Pm% '''P'''atrick '''M'''ichaud
(:else:)
%red% No wikistyle defined for '''{$$Who}'''.
(:if:)
[[#tplcondend]]

No wikistyle defined for {$$Who}.

(:include {$FullName}#tplcond Who=Pm:)
----
(:include {$FullName}#tplcond Who=Simon:)
----
(:include {$FullName}#tplcond:)
----
(:include {$FullName}#tplcond Who=Petko:)

Patrick Michaud


No wikistyle defined for Simon.


No wikistyle defined for .


Petko Yotov

  0: 00.00 00.00 EnablePost = 1, keys=
  1: 00.00 00.00 config start
  2: 00.01 00.01 config end
  3: 00.04 00.03 MarkupToHTML begin
  4: 00.04 00.03 MarkupToHTML begin
  5: 00.04 00.04 MarkupToHTML end
  6: 00.04 00.04 MarkupToHTML begin
  7: 00.05 00.04 MarkupToHTML end
  8: 00.05 00.04 MarkupToHTML begin
  9: 00.05 00.04 MarkupToHTML end
 10: 00.05 00.04 MarkupToHTML begin
 11: 00.05 00.05 MarkupToHTML end
 12: 00.05 00.05 MarkupToHTML begin
 13: 00.05 00.05 MarkupToHTML end
 14: 00.05 00.05 MarkupToHTML begin
 15: 00.05 00.05 MarkupToHTML end
 16: 00.05 00.05 MarkupToHTML begin
 17: 00.06 00.05 MarkupToHTML end
 18: 00.06 00.05 MarkupToHTML begin
 19: 00.06 00.05 MarkupToHTML end
 20: 00.06 00.05 MarkupToHTML begin
 21: 00.06 00.05 MarkupToHTML end
 22: 00.06 00.05 MarkupToHTML begin
 23: 00.06 00.05 MarkupToHTML end
 24: 00.06 00.05 MarkupToHTML begin
 25: 00.06 00.06 MarkupToHTML end
 26: 00.06 00.06 MarkupToHTML begin
 27: 00.09 00.08 MarkupToHTML end
 28: 00.09 00.08 MarkupToHTML begin
 29: 00.09 00.08 FPLTemplate: Chain begin
 30: 00.09 00.08 FPLTemplate: FPLTemplateLoad
 31: 00.09 00.08 FPLTemplate: FPLTemplateDefaults
 32: 00.09 00.08 FPLTemplate: FPLTemplatePageList
 33: 00.09 00.08 MakePageList pre
 34: 00.09 00.08 PageListSources begin
 35: 00.09 00.08 PageStore::ls begin wiki.d/{$FullName}
 36: 00.10 00.09 PageStore::ls merge wiki.d/{$FullName}
 37: 00.10 00.09 PageStore::ls end wiki.d/{$FullName}
 38: 00.11 00.10 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 39: 00.11 00.10 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 40: 00.11 00.10 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 41: 00.12 00.11 PageListSources end count=10464
 42: 00.12 00.11 PageListSort pre ret=4 order=name
 43: 00.12 00.11 MakePageList items count=10464, filters=
 44: 00.13 00.11 MakePageList post count=10464, readc=0
 45: 00.13 00.11 PageListSort begin
 46: 00.13 00.11 PageListSort sort
 47: 00.27 00.25 PageListSort end
 48: 00.27 00.25 MakePageList end
 49: 00.27 00.26 FPLTemplate: FPLTemplatePmWikiOrg
 50: 00.28 00.26 MarkupToHTML begin
 51: 00.28 00.26 MarkupToHTML end
 52: 00.28 00.26 FPLTemplate: FPLTemplateSliceList
 53: 00.28 00.26 FPLTemplate: FPLTemplateFormat
 54: 00.28 00.26 MarkupToHTML begin
 55: 00.28 00.26 MarkupToHTML end
 56: 00.28 00.26 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 57: 00.28 00.26 FPLTemplate: Chain end
 58: 00.28 00.26 MarkupToHTML end
 59: 00.28 00.26 MarkupToHTML begin
 60: 00.28 00.26 FPLTemplate: Chain begin
 61: 00.28 00.26 FPLTemplate: FPLTemplateLoad
 62: 00.28 00.26 FPLTemplate: FPLTemplateDefaults
 63: 00.28 00.26 FPLTemplate: FPLTemplatePageList
 64: 00.28 00.26 MakePageList pre
 65: 00.28 00.26 PageListSources begin
 66: 00.28 00.26 PageStore::ls begin wiki.d/{$FullName}
 67: 00.29 00.27 PageStore::ls merge wiki.d/{$FullName}
 68: 00.29 00.27 PageStore::ls end wiki.d/{$FullName}
 69: 00.29 00.28 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 70: 00.29 00.28 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 71: 00.29 00.28 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 72: 00.30 00.29 PageListSources end count=10464
 73: 00.30 00.29 PageListSort pre ret=4 order=name
 74: 00.30 00.29 MakePageList items count=10464, filters=
 75: 00.31 00.30 MakePageList post count=10464, readc=0
 76: 00.31 00.30 PageListSort begin
 77: 00.31 00.30 PageListSort sort
 78: 00.50 00.48 PageListSort end
 79: 00.50 00.48 MakePageList end
 80: 00.51 00.48 FPLTemplate: FPLTemplatePmWikiOrg
 81: 00.52 00.49 MarkupToHTML begin
 82: 00.52 00.49 MarkupToHTML end
 83: 00.52 00.49 FPLTemplate: FPLTemplateSliceList
 84: 00.52 00.49 FPLTemplate: FPLTemplateFormat
 85: 00.52 00.49 MarkupToHTML begin
 86: 00.52 00.49 MarkupToHTML end
 87: 00.52 00.49 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 88: 00.52 00.49 FPLTemplate: Chain end
 89: 00.52 00.49 MarkupToHTML end
 90: 00.52 00.49 MarkupToHTML begin
 91: 00.52 00.49 FPLTemplate: Chain begin
 92: 00.52 00.49 FPLTemplate: FPLTemplateLoad
 93: 00.52 00.49 FPLTemplate: FPLTemplateDefaults
 94: 00.52 00.49 FPLTemplate: FPLTemplatePageList
 95: 00.52 00.49 MakePageList pre
 96: 00.52 00.49 PageListSources begin
 97: 00.52 00.49 PageStore::ls begin wiki.d/{$FullName}
 98: 00.53 00.50 PageStore::ls merge wiki.d/{$FullName}
 99: 00.53 00.50 PageStore::ls end wiki.d/{$FullName}
100: 00.54 00.50 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
101: 00.54 00.50 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
102: 00.54 00.50 PageStore::ls end $FarmD/wikilib.d/{$FullName}
103: 00.55 00.51 PageListSources end count=10464
104: 00.55 00.51 PageListSort pre ret=4 order=name
105: 00.55 00.51 MakePageList items count=10464, filters=
106: 00.56 00.52 MakePageList post count=10464, readc=0
107: 00.56 00.52 PageListSort begin
108: 00.56 00.52 PageListSort sort
109: 00.74 00.68 PageListSort end
110: 00.74 00.68 MakePageList end
111: 00.74 00.68 FPLTemplate: FPLTemplatePmWikiOrg
112: 00.75 00.69 MarkupToHTML begin
113: 00.75 00.69 MarkupToHTML end
114: 00.75 00.69 FPLTemplate: FPLTemplateSliceList
115: 00.75 00.69 FPLTemplate: FPLTemplateFormat
116: 00.75 00.69 MarkupToHTML begin
117: 00.75 00.69 MarkupToHTML end
118: 00.75 00.69 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
119: 00.75 00.69 FPLTemplate: Chain end
120: 00.75 00.69 MarkupToHTML end
121: 00.75 00.69 MarkupToHTML begin
122: 00.75 00.69 FPLTemplate: Chain begin
123: 00.75 00.69 FPLTemplate: FPLTemplateLoad
124: 00.75 00.69 FPLTemplate: FPLTemplateDefaults
125: 00.75 00.69 FPLTemplate: FPLTemplatePageList
126: 00.75 00.69 MakePageList pre
127: 00.75 00.69 PageListSources begin
128: 00.75 00.69 PageStore::ls begin wiki.d/{$FullName}
129: 00.76 00.69 PageStore::ls merge wiki.d/{$FullName}
130: 00.76 00.70 PageStore::ls end wiki.d/{$FullName}
131: 00.76 00.70 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
132: 00.76 00.70 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
133: 00.76 00.70 PageStore::ls end $FarmD/wikilib.d/{$FullName}
134: 00.77 00.71 PageListSources end count=10464
135: 00.77 00.71 PageListSort pre ret=4 order=name
136: 00.77 00.71 MakePageList items count=10464, filters=
137: 00.78 00.72 MakePageList post count=10464, readc=0
138: 00.78 00.72 PageListSort begin
139: 00.78 00.72 PageListSort sort
140: 00.98 00.88 PageListSort end
141: 00.98 00.88 MakePageList end
142: 00.98 00.89 FPLTemplate: FPLTemplatePmWikiOrg
143: 00.99 00.89 MarkupToHTML begin
144: 00.99 00.89 MarkupToHTML end
145: 00.99 00.89 FPLTemplate: FPLTemplateSliceList
146: 00.99 00.89 FPLTemplate: FPLTemplateFormat
147: 00.99 00.89 MarkupToHTML begin
148: 00.99 00.89 MarkupToHTML end
149: 00.99 00.89 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
150: 00.99 00.89 FPLTemplate: Chain end
151: 00.99 00.89 MarkupToHTML end
152: 00.99 00.89 MarkupToHTML begin
153: 00.99 00.90 MarkupToHTML end
154: 00.99 00.90 MarkupToHTML begin
155: 01.00 00.90 MarkupToHTML end
156: 01.00 00.90 MarkupToHTML begin
157: 01.00 00.90 MarkupToHTML end
158: 01.02 00.92 MarkupToHTML end
159: 01.03 00.93 MarkupToHTML begin
160: 01.04 00.93 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
161: 01.04 00.94 ReadApprovedUrls SiteAdmin.ApprovedUrls end
162: 01.05 00.94 MarkupToHTML end
163: 01.05 00.94 MarkupToHTML begin
164: 01.06 00.95 MarkupToHTML end
165: 01.06 00.95 now
Peak memory: 11,465,656 bytes