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 EnablePost = 1, keys=
  1: 00.00 00.00 config start
  2: 00.01 00.01 config end
  3: 00.03 00.03 MarkupToHTML begin
  4: 00.03 00.03 MarkupToHTML begin
  5: 00.04 00.03 MarkupToHTML end
  6: 00.04 00.03 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.04 MarkupToHTML end
 12: 00.05 00.04 MarkupToHTML begin
 13: 00.05 00.04 MarkupToHTML end
 14: 00.05 00.04 MarkupToHTML begin
 15: 00.05 00.04 MarkupToHTML end
 16: 00.05 00.04 MarkupToHTML begin
 17: 00.05 00.04 MarkupToHTML end
 18: 00.05 00.04 MarkupToHTML begin
 19: 00.05 00.05 MarkupToHTML end
 20: 00.05 00.05 MarkupToHTML begin
 21: 00.05 00.05 MarkupToHTML end
 22: 00.05 00.05 MarkupToHTML begin
 23: 00.05 00.05 MarkupToHTML end
 24: 00.05 00.05 MarkupToHTML begin
 25: 00.05 00.05 MarkupToHTML end
 26: 00.06 00.05 MarkupToHTML begin
 27: 00.07 00.07 MarkupToHTML end
 28: 00.07 00.07 MarkupToHTML begin
 29: 00.07 00.07 FPLTemplate: Chain begin
 30: 00.07 00.07 FPLTemplate: FPLTemplateLoad
 31: 00.07 00.07 FPLTemplate: FPLTemplateDefaults
 32: 00.07 00.07 FPLTemplate: FPLTemplatePageList
 33: 00.07 00.07 MakePageList pre
 34: 00.07 00.07 PageListSources begin
 35: 00.07 00.07 PageStore::ls begin wiki.d/{$FullName}
 36: 00.08 00.07 PageStore::ls merge wiki.d/{$FullName}
 37: 00.08 00.07 PageStore::ls end wiki.d/{$FullName}
 38: 00.09 00.08 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 39: 00.09 00.08 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 40: 00.09 00.08 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 41: 00.10 00.09 PageListSources end count=10449
 42: 00.10 00.09 PageListSort pre ret=4 order=name
 43: 00.10 00.09 MakePageList items count=10449, filters=
 44: 00.11 00.10 MakePageList post count=10449, readc=0
 45: 00.11 00.10 PageListSort begin
 46: 00.11 00.10 PageListSort sort
 47: 00.25 00.24 PageListSort end
 48: 00.25 00.24 MakePageList end
 49: 00.25 00.24 FPLTemplate: FPLTemplatePmWikiOrg
 50: 00.26 00.24 MarkupToHTML begin
 51: 00.26 00.24 MarkupToHTML end
 52: 00.26 00.24 FPLTemplate: FPLTemplateSliceList
 53: 00.26 00.24 FPLTemplate: FPLTemplateFormat
 54: 00.26 00.24 MarkupToHTML begin
 55: 00.26 00.24 MarkupToHTML end
 56: 00.26 00.24 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 57: 00.26 00.24 FPLTemplate: Chain end
 58: 00.26 00.24 MarkupToHTML end
 59: 00.26 00.24 MarkupToHTML begin
 60: 00.26 00.24 FPLTemplate: Chain begin
 61: 00.26 00.24 FPLTemplate: FPLTemplateLoad
 62: 00.26 00.24 FPLTemplate: FPLTemplateDefaults
 63: 00.26 00.24 FPLTemplate: FPLTemplatePageList
 64: 00.26 00.24 MakePageList pre
 65: 00.26 00.25 PageListSources begin
 66: 00.26 00.25 PageStore::ls begin wiki.d/{$FullName}
 67: 00.27 00.25 PageStore::ls merge wiki.d/{$FullName}
 68: 00.27 00.25 PageStore::ls end wiki.d/{$FullName}
 69: 00.27 00.26 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 70: 00.27 00.26 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 71: 00.27 00.26 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 72: 00.28 00.26 PageListSources end count=10449
 73: 00.28 00.26 PageListSort pre ret=4 order=name
 74: 00.28 00.26 MakePageList items count=10449, filters=
 75: 00.29 00.27 MakePageList post count=10449, readc=0
 76: 00.29 00.27 PageListSort begin
 77: 00.29 00.27 PageListSort sort
 78: 00.44 00.42 PageListSort end
 79: 00.44 00.42 MakePageList end
 80: 00.44 00.42 FPLTemplate: FPLTemplatePmWikiOrg
 81: 00.45 00.43 MarkupToHTML begin
 82: 00.45 00.43 MarkupToHTML end
 83: 00.45 00.43 FPLTemplate: FPLTemplateSliceList
 84: 00.45 00.43 FPLTemplate: FPLTemplateFormat
 85: 00.45 00.43 MarkupToHTML begin
 86: 00.45 00.43 MarkupToHTML end
 87: 00.45 00.43 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 88: 00.45 00.43 FPLTemplate: Chain end
 89: 00.45 00.43 MarkupToHTML end
 90: 00.45 00.43 MarkupToHTML begin
 91: 00.45 00.43 FPLTemplate: Chain begin
 92: 00.45 00.43 FPLTemplate: FPLTemplateLoad
 93: 00.45 00.43 FPLTemplate: FPLTemplateDefaults
 94: 00.45 00.43 FPLTemplate: FPLTemplatePageList
 95: 00.45 00.43 MakePageList pre
 96: 00.45 00.43 PageListSources begin
 97: 00.45 00.43 PageStore::ls begin wiki.d/{$FullName}
 98: 00.46 00.44 PageStore::ls merge wiki.d/{$FullName}
 99: 00.46 00.44 PageStore::ls end wiki.d/{$FullName}
100: 00.46 00.44 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
101: 00.46 00.44 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
102: 00.46 00.44 PageStore::ls end $FarmD/wikilib.d/{$FullName}
103: 00.47 00.45 PageListSources end count=10449
104: 00.47 00.45 PageListSort pre ret=4 order=name
105: 00.47 00.45 MakePageList items count=10449, filters=
106: 00.48 00.46 MakePageList post count=10449, readc=0
107: 00.48 00.46 PageListSort begin
108: 00.48 00.46 PageListSort sort
109: 00.63 00.61 PageListSort end
110: 00.63 00.61 MakePageList end
111: 00.63 00.61 FPLTemplate: FPLTemplatePmWikiOrg
112: 00.63 00.62 MarkupToHTML begin
113: 00.64 00.62 MarkupToHTML end
114: 00.64 00.62 FPLTemplate: FPLTemplateSliceList
115: 00.64 00.62 FPLTemplate: FPLTemplateFormat
116: 00.64 00.62 MarkupToHTML begin
117: 00.64 00.62 MarkupToHTML end
118: 00.64 00.62 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
119: 00.64 00.62 FPLTemplate: Chain end
120: 00.64 00.62 MarkupToHTML end
121: 00.64 00.62 MarkupToHTML begin
122: 00.64 00.62 FPLTemplate: Chain begin
123: 00.64 00.62 FPLTemplate: FPLTemplateLoad
124: 00.64 00.62 FPLTemplate: FPLTemplateDefaults
125: 00.64 00.62 FPLTemplate: FPLTemplatePageList
126: 00.64 00.62 MakePageList pre
127: 00.64 00.62 PageListSources begin
128: 00.64 00.62 PageStore::ls begin wiki.d/{$FullName}
129: 00.64 00.62 PageStore::ls merge wiki.d/{$FullName}
130: 00.65 00.62 PageStore::ls end wiki.d/{$FullName}
131: 00.65 00.63 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
132: 00.65 00.63 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
133: 00.65 00.63 PageStore::ls end $FarmD/wikilib.d/{$FullName}
134: 00.66 00.64 PageListSources end count=10449
135: 00.66 00.64 PageListSort pre ret=4 order=name
136: 00.66 00.64 MakePageList items count=10449, filters=
137: 00.67 00.65 MakePageList post count=10449, readc=0
138: 00.67 00.65 PageListSort begin
139: 00.67 00.65 PageListSort sort
140: 00.81 00.79 PageListSort end
141: 00.81 00.79 MakePageList end
142: 00.82 00.79 FPLTemplate: FPLTemplatePmWikiOrg
143: 00.82 00.80 MarkupToHTML begin
144: 00.82 00.80 MarkupToHTML end
145: 00.82 00.80 FPLTemplate: FPLTemplateSliceList
146: 00.82 00.80 FPLTemplate: FPLTemplateFormat
147: 00.82 00.80 MarkupToHTML begin
148: 00.82 00.80 MarkupToHTML end
149: 00.82 00.80 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
150: 00.82 00.80 FPLTemplate: Chain end
151: 00.82 00.80 MarkupToHTML end
152: 00.82 00.80 MarkupToHTML begin
153: 00.83 00.80 MarkupToHTML end
154: 00.83 00.80 MarkupToHTML begin
155: 00.83 00.81 MarkupToHTML end
156: 00.83 00.81 MarkupToHTML begin
157: 00.83 00.81 MarkupToHTML end
158: 00.85 00.82 MarkupToHTML end
159: 00.85 00.83 MarkupToHTML begin
160: 00.86 00.83 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
161: 00.86 00.83 ReadApprovedUrls SiteAdmin.ApprovedUrls end
162: 00.87 00.84 MarkupToHTML end
163: 00.87 00.84 MarkupToHTML begin
164: 00.87 00.84 MarkupToHTML end
165: 00.87 00.85 now
Peak memory: 11,409,280 bytes