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.06 00.02 config end
  2: 00.69 00.23 MarkupToHTML begin
  3: 00.69 00.23 MarkupToHTML begin
  4: 00.71 00.23 MarkupToHTML end
  5: 00.71 00.23 MarkupToHTML begin
  6: 00.72 00.24 MarkupToHTML end
  7: 00.72 00.24 MarkupToHTML begin
  8: 00.72 00.24 MarkupToHTML end
  9: 00.72 00.24 MarkupToHTML begin
 10: 00.73 00.25 MarkupToHTML end
 11: 00.73 00.25 MarkupToHTML begin
 12: 00.73 00.25 MarkupToHTML end
 13: 00.73 00.25 MarkupToHTML begin
 14: 00.73 00.25 MarkupToHTML end
 15: 00.73 00.25 MarkupToHTML begin
 16: 00.73 00.25 MarkupToHTML end
 17: 00.73 00.25 MarkupToHTML begin
 18: 00.73 00.25 MarkupToHTML end
 19: 00.73 00.25 MarkupToHTML begin
 20: 00.73 00.25 MarkupToHTML end
 21: 00.73 00.25 MarkupToHTML begin
 22: 00.75 00.26 MarkupToHTML end
 23: 00.75 00.26 MarkupToHTML begin
 24: 00.75 00.26 MarkupToHTML end
 25: 00.75 00.26 MarkupToHTML begin
 26: 00.79 00.28 MarkupToHTML end
 27: 00.79 00.28 MarkupToHTML begin
 28: 00.79 00.29 FPLTemplate: Chain begin
 29: 00.79 00.29 FPLTemplate: FPLTemplateLoad
 30: 00.79 00.29 FPLTemplate: FPLTemplateDefaults
 31: 00.79 00.29 FPLTemplate: FPLTemplatePageList
 32: 00.79 00.29 MakePageList pre
 33: 00.79 00.29 PageListSources begin
 34: 00.79 00.29 PageStore::ls begin wiki.d/{$FullName}
 35: 00.80 00.29 PageStore::ls merge wiki.d/{$FullName}
 36: 00.80 00.29 PageStore::ls end wiki.d/{$FullName}
 37: 00.81 00.30 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 38: 00.81 00.30 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 39: 00.81 00.30 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 40: 00.82 00.31 PageListSources end count=10340
 41: 00.82 00.31 PageListSort pre ret=4 order=name
 42: 00.82 00.31 MakePageList items count=10340, filters=
 43: 00.84 00.32 MakePageList post count=10340, readc=0
 44: 00.84 00.32 PageListSort begin
 45: 00.84 00.32 PageListSort sort
 46: 01.29 00.52 PageListSort end
 47: 01.29 00.52 MakePageList end
 48: 01.30 00.53 FPLTemplate: FPLTemplatePmWikiOrg
 49: 01.30 00.53 MarkupToHTML begin
 50: 01.30 00.53 MarkupToHTML end
 51: 01.30 00.53 FPLTemplate: FPLTemplateSliceList
 52: 01.30 00.53 FPLTemplate: FPLTemplateFormat
 53: 01.30 00.53 MarkupToHTML begin
 54: 01.30 00.53 MarkupToHTML end
 55: 01.30 00.53 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 56: 01.30 00.53 FPLTemplate: Chain end
 57: 01.33 00.53 MarkupToHTML end
 58: 01.33 00.53 MarkupToHTML begin
 59: 01.33 00.53 FPLTemplate: Chain begin
 60: 01.33 00.53 FPLTemplate: FPLTemplateLoad
 61: 01.33 00.53 FPLTemplate: FPLTemplateDefaults
 62: 01.33 00.53 FPLTemplate: FPLTemplatePageList
 63: 01.33 00.53 MakePageList pre
 64: 01.33 00.53 PageListSources begin
 65: 01.33 00.53 PageStore::ls begin wiki.d/{$FullName}
 66: 01.34 00.54 PageStore::ls merge wiki.d/{$FullName}
 67: 01.35 00.54 PageStore::ls end wiki.d/{$FullName}
 68: 01.36 00.55 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 69: 01.36 00.55 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 70: 01.36 00.55 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 71: 01.38 00.56 PageListSources end count=10340
 72: 01.38 00.56 PageListTermsTargets begin count=10340
 73: 01.38 00.56 PageIndexGrep begin
 74: 01.45 00.59 PageIndexGrep end
 75: 01.45 00.59 PageListTermsTargets end count=6
 76: 01.45 00.59 PageListSort pre ret=4 order=name
 77: 01.45 00.59 MakePageList items count=6, filters=PageListTermsTargets
 78: 01.52 00.62 MakePageList post count=5, readc=6
 79: 01.52 00.62 PageListSort begin
 80: 01.52 00.62 PageListSort sort
 81: 01.52 00.62 PageListSort end
 82: 01.52 00.62 MakePageList end
 83: 01.52 00.62 FPLTemplate: FPLTemplatePmWikiOrg
 84: 01.52 00.62 MarkupToHTML begin
 85: 01.52 00.62 MarkupToHTML end
 86: 01.52 00.62 FPLTemplate: FPLTemplateSliceList
 87: 01.52 00.62 FPLTemplate: FPLTemplateFormat
 88: 01.52 00.62 MarkupToHTML begin
 89: 01.53 00.62 MarkupToHTML end
 90: 01.53 00.62 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
 91: 01.53 00.62 FPLTemplate: Chain end
 92: 01.53 00.62 MarkupToHTML end
 93: 01.53 00.62 MarkupToHTML begin
 94: 01.53 00.62 FPLTemplate: Chain begin
 95: 01.53 00.62 FPLTemplate: FPLTemplateLoad
 96: 01.53 00.62 FPLTemplate: FPLTemplateDefaults
 97: 01.53 00.62 FPLTemplate: FPLTemplatePageList
 98: 01.53 00.62 MakePageList pre
 99: 01.53 00.62 PageListSources begin
100: 01.53 00.62 PageStore::ls begin wiki.d/{$FullName}
101: 01.53 00.63 PageStore::ls merge wiki.d/{$FullName}
102: 01.54 00.63 PageStore::ls end wiki.d/{$FullName}
103: 01.54 00.64 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
104: 01.54 00.64 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
105: 01.54 00.64 PageStore::ls end $FarmD/wikilib.d/{$FullName}
106: 01.56 00.65 PageListSources end count=10340
107: 01.56 00.65 PageListSort pre ret=4 order=name
108: 01.56 00.65 MakePageList items count=10340, filters=
109: 01.57 00.66 MakePageList post count=10340, readc=0
110: 01.57 00.66 PageListSort begin
111: 01.57 00.66 PageListSort sort
112: 01.86 00.87 PageListSort end
113: 01.86 00.87 MakePageList end
114: 01.87 00.87 FPLTemplate: FPLTemplatePmWikiOrg
115: 01.87 00.88 MarkupToHTML begin
116: 01.87 00.88 MarkupToHTML end
117: 01.87 00.88 FPLTemplate: FPLTemplateSliceList
118: 01.87 00.88 FPLTemplate: FPLTemplateFormat
119: 01.87 00.88 MarkupToHTML begin
120: 01.88 00.88 MarkupToHTML end
121: 01.88 00.88 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
122: 01.88 00.88 FPLTemplate: Chain end
123: 01.88 00.88 MarkupToHTML end
124: 01.88 00.88 MarkupToHTML begin
125: 01.88 00.88 FPLTemplate: Chain begin
126: 01.88 00.88 FPLTemplate: FPLTemplateLoad
127: 01.88 00.88 FPLTemplate: FPLTemplateDefaults
128: 01.88 00.88 FPLTemplate: FPLTemplatePageList
129: 01.88 00.88 MakePageList pre
130: 01.88 00.88 PageListSources begin
131: 01.88 00.88 PageStore::ls begin wiki.d/{$FullName}
132: 01.88 00.89 PageStore::ls merge wiki.d/{$FullName}
133: 01.89 00.89 PageStore::ls end wiki.d/{$FullName}
134: 01.90 00.89 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
135: 01.90 00.89 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
136: 01.90 00.89 PageStore::ls end $FarmD/wikilib.d/{$FullName}
137: 01.90 00.90 PageListSources end count=10340
138: 01.91 00.90 PageListSort pre ret=4 order=name
139: 01.91 00.90 MakePageList items count=10340, filters=
140: 01.92 00.92 MakePageList post count=10340, readc=0
141: 01.92 00.92 PageListSort begin
142: 01.92 00.92 PageListSort sort
143: 02.28 01.14 PageListSort end
144: 02.28 01.14 MakePageList end
145: 02.30 01.14 FPLTemplate: FPLTemplatePmWikiOrg
146: 02.30 01.15 MarkupToHTML begin
147: 02.30 01.15 MarkupToHTML end
148: 02.30 01.15 FPLTemplate: FPLTemplateSliceList
149: 02.30 01.15 FPLTemplate: FPLTemplateFormat
150: 02.30 01.15 MarkupToHTML begin
151: 02.30 01.15 MarkupToHTML end
152: 02.30 01.15 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
153: 02.30 01.15 FPLTemplate: Chain end
154: 02.30 01.15 MarkupToHTML end
155: 02.30 01.15 MarkupToHTML begin
156: 02.31 01.15 MarkupToHTML end
157: 02.31 01.15 MarkupToHTML begin
158: 02.31 01.16 MarkupToHTML end
159: 02.31 01.16 MarkupToHTML begin
160: 02.32 01.16 MarkupToHTML end
161: 02.34 01.18 MarkupToHTML end
162: 02.34 01.18 MarkupToHTML begin
163: 02.35 01.19 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
164: 02.36 01.20 ReadApprovedUrls SiteAdmin.ApprovedUrls end
165: 02.37 01.21 MarkupToHTML end
166: 02.37 01.21 MarkupToHTML begin
167: 02.38 01.22 MarkupToHTML end
168: 02.38 01.22 now
Peak memory: 11,554,648 bytes