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 ?


What happens with an ?


What happens with an Hello ?

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 config start
  1: 00.01 00.01 config end
  2: 00.21 00.20 MarkupToHTML begin
  3: 00.22 00.21 MarkupToHTML begin
  4: 00.23 00.22 MarkupToHTML end
  5: 00.23 00.22 MarkupToHTML begin
  6: 00.24 00.22 MarkupToHTML end
  7: 00.24 00.22 MarkupToHTML begin
  8: 00.24 00.23 MarkupToHTML end
  9: 00.24 00.23 MarkupToHTML begin
 10: 00.24 00.23 MarkupToHTML end
 11: 00.24 00.23 MarkupToHTML begin
 12: 00.24 00.23 MarkupToHTML end
 13: 00.24 00.23 MarkupToHTML begin
 14: 00.24 00.23 MarkupToHTML end
 15: 00.24 00.23 MarkupToHTML begin
 16: 00.24 00.23 MarkupToHTML end
 17: 00.24 00.23 MarkupToHTML begin
 18: 00.25 00.23 MarkupToHTML end
 19: 00.25 00.23 MarkupToHTML begin
 20: 00.25 00.23 MarkupToHTML end
 21: 00.25 00.23 MarkupToHTML begin
 22: 00.25 00.23 MarkupToHTML end
 23: 00.25 00.23 MarkupToHTML begin
 24: 00.25 00.24 MarkupToHTML end
 25: 00.25 00.24 MarkupToHTML begin
 26: 00.27 00.25 MarkupToHTML end
 27: 00.27 00.25 MarkupToHTML begin
 28: 00.27 00.25 FPLTemplate: Chain begin
 29: 00.27 00.25 FPLTemplate: FPLTemplateLoad
 30: 00.27 00.26 FPLTemplate: FPLTemplateDefaults
 31: 00.27 00.26 FPLTemplate: FPLTemplatePageList
 32: 00.27 00.26 MakePageList pre
 33: 00.27 00.26 PageListSources begin
 34: 00.27 00.26 PageStore::ls begin wiki.d/{$FullName}
 35: 00.28 00.26 PageStore::ls merge wiki.d/{$FullName}
 36: 00.28 00.26 PageStore::ls end wiki.d/{$FullName}
 37: 00.28 00.27 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 38: 00.28 00.27 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 39: 00.28 00.27 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 40: 00.29 00.28 PageListSources end count=10279
 41: 00.29 00.28 PageListSort pre ret=4 order=name
 42: 00.29 00.28 MakePageList items count=10279, filters=
 43: 00.30 00.29 MakePageList post count=10279, readc=0
 44: 00.30 00.29 PageListSort begin
 45: 00.30 00.29 PageListSort sort
 46: 00.48 00.46 PageListSort end
 47: 00.48 00.46 MakePageList end
 48: 00.49 00.47 FPLTemplate: FPLTemplatePmWikiOrg
 49: 00.49 00.47 MarkupToHTML begin
 50: 00.49 00.47 MarkupToHTML end
 51: 00.49 00.47 FPLTemplate: FPLTemplateSliceList
 52: 00.49 00.47 FPLTemplate: FPLTemplateFormat
 53: 00.49 00.47 MarkupToHTML begin
 54: 00.49 00.47 MarkupToHTML end
 55: 00.49 00.47 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 56: 00.49 00.47 FPLTemplate: Chain end
 57: 00.49 00.47 MarkupToHTML end
 58: 00.49 00.47 MarkupToHTML begin
 59: 00.49 00.47 FPLTemplate: Chain begin
 60: 00.49 00.47 FPLTemplate: FPLTemplateLoad
 61: 00.49 00.47 FPLTemplate: FPLTemplateDefaults
 62: 00.49 00.47 FPLTemplate: FPLTemplatePageList
 63: 00.49 00.47 MakePageList pre
 64: 00.49 00.47 PageListSources begin
 65: 00.49 00.47 PageStore::ls begin wiki.d/{$FullName}
 66: 00.50 00.48 PageStore::ls merge wiki.d/{$FullName}
 67: 00.50 00.48 PageStore::ls end wiki.d/{$FullName}
 68: 00.51 00.48 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 69: 00.51 00.48 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 70: 00.51 00.48 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 71: 00.52 00.49 PageListSources end count=10279
 72: 00.52 00.49 PageListTermsTargets begin count=10279
 73: 00.52 00.49 PageIndexGrep begin
 74: 00.56 00.52 PageIndexGrep end
 75: 00.56 00.52 PageListTermsTargets end count=6
 76: 00.56 00.52 PageListSort pre ret=4 order=name
 77: 00.56 00.52 MakePageList items count=6, filters=PageListTermsTargets
 78: 00.59 00.55 MakePageList post count=5, readc=6
 79: 00.59 00.55 PageListSort begin
 80: 00.59 00.55 PageListSort sort
 81: 00.59 00.55 PageListSort end
 82: 00.59 00.55 MakePageList end
 83: 00.59 00.55 FPLTemplate: FPLTemplatePmWikiOrg
 84: 00.59 00.55 MarkupToHTML begin
 85: 00.59 00.55 MarkupToHTML end
 86: 00.59 00.55 FPLTemplate: FPLTemplateSliceList
 87: 00.59 00.55 FPLTemplate: FPLTemplateFormat
 88: 00.59 00.55 MarkupToHTML begin
 89: 00.59 00.55 MarkupToHTML end
 90: 00.59 00.55 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 91: 00.59 00.55 FPLTemplate: Chain end
 92: 00.59 00.55 MarkupToHTML end
 93: 00.59 00.55 MarkupToHTML begin
 94: 00.59 00.55 FPLTemplate: Chain begin
 95: 00.59 00.55 FPLTemplate: FPLTemplateLoad
 96: 00.59 00.55 FPLTemplate: FPLTemplateDefaults
 97: 00.59 00.55 FPLTemplate: FPLTemplatePageList
 98: 00.59 00.55 MakePageList pre
 99: 00.59 00.55 PageListSources begin
100: 00.59 00.55 PageStore::ls begin wiki.d/{$FullName}
101: 00.60 00.55 PageStore::ls merge wiki.d/{$FullName}
102: 00.60 00.56 PageStore::ls end wiki.d/{$FullName}
103: 00.61 00.56 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
104: 00.61 00.56 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
105: 00.61 00.56 PageStore::ls end $FarmD/wikilib.d/{$FullName}
106: 00.62 00.57 PageListSources end count=10279
107: 00.62 00.57 PageListSort pre ret=4 order=name
108: 00.62 00.57 MakePageList items count=10279, filters=
109: 00.63 00.58 MakePageList post count=10279, readc=0
110: 00.63 00.58 PageListSort begin
111: 00.63 00.58 PageListSort sort
112: 00.79 00.73 PageListSort end
113: 00.79 00.73 MakePageList end
114: 00.79 00.74 FPLTemplate: FPLTemplatePmWikiOrg
115: 00.79 00.74 MarkupToHTML begin
116: 00.79 00.74 MarkupToHTML end
117: 00.79 00.74 FPLTemplate: FPLTemplateSliceList
118: 00.79 00.74 FPLTemplate: FPLTemplateFormat
119: 00.79 00.74 MarkupToHTML begin
120: 00.80 00.74 MarkupToHTML end
121: 00.80 00.74 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
122: 00.80 00.74 FPLTemplate: Chain end
123: 00.80 00.74 MarkupToHTML end
124: 00.80 00.74 MarkupToHTML begin
125: 00.80 00.74 FPLTemplate: Chain begin
126: 00.80 00.74 FPLTemplate: FPLTemplateLoad
127: 00.80 00.74 FPLTemplate: FPLTemplateDefaults
128: 00.80 00.74 FPLTemplate: FPLTemplatePageList
129: 00.80 00.74 MakePageList pre
130: 00.80 00.74 PageListSources begin
131: 00.80 00.74 PageStore::ls begin wiki.d/{$FullName}
132: 00.80 00.75 PageStore::ls merge wiki.d/{$FullName}
133: 00.81 00.75 PageStore::ls end wiki.d/{$FullName}
134: 00.81 00.76 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
135: 00.81 00.76 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
136: 00.81 00.76 PageStore::ls end $FarmD/wikilib.d/{$FullName}
137: 00.82 00.76 PageListSources end count=10279
138: 00.82 00.76 PageListSort pre ret=4 order=name
139: 00.82 00.76 MakePageList items count=10279, filters=
140: 00.83 00.77 MakePageList post count=10279, readc=0
141: 00.83 00.77 PageListSort begin
142: 00.83 00.77 PageListSort sort
143: 00.99 00.93 PageListSort end
144: 00.99 00.93 MakePageList end
145: 00.99 00.94 FPLTemplate: FPLTemplatePmWikiOrg
146: 01.00 00.94 MarkupToHTML begin
147: 01.00 00.94 MarkupToHTML end
148: 01.00 00.94 FPLTemplate: FPLTemplateSliceList
149: 01.00 00.94 FPLTemplate: FPLTemplateFormat
150: 01.00 00.94 MarkupToHTML begin
151: 01.00 00.94 MarkupToHTML end
152: 01.00 00.94 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
153: 01.00 00.94 FPLTemplate: Chain end
154: 01.00 00.94 MarkupToHTML end
155: 01.00 00.94 MarkupToHTML begin
156: 01.01 00.95 MarkupToHTML end
157: 01.01 00.95 MarkupToHTML begin
158: 01.01 00.95 MarkupToHTML end
159: 01.01 00.95 MarkupToHTML begin
160: 01.01 00.95 MarkupToHTML end
161: 01.02 00.96 MarkupToHTML end
162: 01.03 00.97 MarkupToHTML begin
163: 01.03 00.97 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
164: 01.04 00.98 ReadApprovedUrls SiteAdmin.ApprovedUrls end
165: 01.04 00.98 MarkupToHTML end
166: 01.04 00.98 MarkupToHTML begin
167: 01.05 00.99 MarkupToHTML end
168: 01.05 00.99 now
Peak memory: 11,451,008 bytes