Recent Changes - Search:

PmWiki

pmwiki.org

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

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, Name=, 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 EscapedVariable= ?


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

Edit - History - Print - Recent Changes - Search
Page last modified on February 24, 2010, at 01:46 PM
  0: 00.00 00.00 config start
  1: 00.00 00.00 config end
  2: 00.07 00.06 MarkupToHTML begin
  3: 00.07 00.07 MarkupToHTML begin
  4: 00.08 00.07 MarkupToHTML end
  5: 00.08 00.07 MarkupToHTML begin
  6: 00.10 00.10 MarkupToHTML end
  7: 00.10 00.10 MarkupToHTML begin
  8: 00.11 00.10 MarkupToHTML end
  9: 00.11 00.10 MarkupToHTML begin
 10: 00.12 00.11 MarkupToHTML end
 11: 00.12 00.11 MarkupToHTML begin
 12: 00.12 00.11 MarkupToHTML end
 13: 00.13 00.11 MarkupToHTML begin
 14: 00.13 00.12 MarkupToHTML end
 15: 00.13 00.12 MarkupToHTML begin
 16: 00.14 00.13 MarkupToHTML end
 17: 00.14 00.13 MarkupToHTML begin
 18: 00.15 00.13 MarkupToHTML end
 19: 00.15 00.13 MarkupToHTML begin
 20: 00.15 00.13 MarkupToHTML end
 21: 00.15 00.13 MarkupToHTML begin
 22: 00.15 00.14 MarkupToHTML end
 23: 00.15 00.14 MarkupToHTML begin
 24: 00.16 00.14 MarkupToHTML end
 25: 00.16 00.14 MarkupToHTML begin
 26: 00.46 00.20 MarkupToHTML end
 27: 00.46 00.20 MarkupToHTML begin
 28: 00.46 00.20 FPLTemplate: Chain begin
 29: 00.46 00.20 FPLTemplate: FPLTemplateLoad
 30: 00.46 00.20 FPLTemplate: FPLTemplateDefaults
 31: 00.46 00.20 FPLTemplate: FPLTemplatePageList
 32: 00.46 00.20 MakePageList pre
 33: 00.46 00.20 PageListSources begin
 34: 00.46 00.20 PageStore::ls begin wiki.d/{$FullName}
 35: 00.71 00.23 PageStore::ls merge wiki.d/{$FullName}
 36: 00.83 00.29 PageStore::ls end wiki.d/{$FullName}
 37: 00.89 00.32 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 38: 00.90 00.32 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 39: 00.90 00.32 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 40: 00.97 00.36 PageListSources end count=7747
 41: 00.98 00.36 PageListSort pre ret=4 order=name
 42: 00.98 00.36 MakePageList items count=7747, filters=
 43: 01.26 00.50 MakePageList post count=7747, readc=0
 44: 01.27 00.51 PageListCache begin save key=56fb8d4dbe2fd5738f7b8f5d2619419c
 45: 01.30 00.52 PageListCache end save
 46: 01.30 00.52 PageListSort begin
 47: 01.30 00.52 PageListSort sort
 48: 02.94 01.30 PageListSort end
 49: 02.94 01.30 MakePageList end
 50: 03.01 01.34 FPLTemplate: FPLTemplateSliceList
 51: 03.03 01.35 FPLTemplate: FPLTemplateFormat
 52: 03.04 01.35 MarkupToHTML begin
 53: 03.04 01.36 MarkupToHTML end
 54: 03.04 01.36 FPLTemplate: Chain end
 55: 03.05 01.36 MarkupToHTML end
 56: 03.05 01.36 MarkupToHTML begin
 57: 03.05 01.36 FPLTemplate: Chain begin
 58: 03.05 01.36 FPLTemplate: FPLTemplateLoad
 59: 03.05 01.36 FPLTemplate: FPLTemplateDefaults
 60: 03.05 01.36 FPLTemplate: FPLTemplatePageList
 61: 03.05 01.36 MakePageList pre
 62: 03.06 01.36 PageListSources begin
 63: 03.06 01.36 PageStore::ls begin wiki.d/{$FullName}
 64: 03.25 01.38 PageStore::ls merge wiki.d/{$FullName}
 65: 03.40 01.44 PageStore::ls end wiki.d/{$FullName}
 66: 03.49 01.48 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 67: 03.49 01.49 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 68: 03.49 01.49 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 69: 03.57 01.53 PageListSources end count=7747
 70: 03.59 01.54 PageListTermsTargets begin count=7747
 71: 03.59 01.54 PageIndexGrep begin
 72: 03.87 01.67 PageIndexGrep end
 73: 04.00 01.74 PageListTermsTargets end count=3
 74: 04.02 01.75 PageListSort pre ret=4 order=name
 75: 04.02 01.75 MakePageList items count=3, filters=PageListTermsTargets
 76: 04.03 01.75 MakePageList post count=2, readc=3
 77: 04.03 01.75 PageListCache begin save key=27b5c657a0647088ad5edafaf3bebe2b
 78: 04.03 01.75 PageListCache end save
 79: 04.03 01.75 PageListSort begin
 80: 04.03 01.75 PageListSort sort
 81: 04.03 01.75 PageListSort end
 82: 04.03 01.75 MakePageList end
 83: 04.03 01.75 FPLTemplate: FPLTemplateSliceList
 84: 04.03 01.75 FPLTemplate: FPLTemplateFormat
 85: 04.03 01.75 MarkupToHTML begin
 86: 04.04 01.76 MarkupToHTML end
 87: 04.04 01.76 FPLTemplate: Chain end
 88: 04.04 01.76 MarkupToHTML end
 89: 04.04 01.76 MarkupToHTML begin
 90: 04.04 01.76 FPLTemplate: Chain begin
 91: 04.04 01.76 FPLTemplate: FPLTemplateLoad
 92: 04.05 01.76 FPLTemplate: FPLTemplateDefaults
 93: 04.05 01.76 FPLTemplate: FPLTemplatePageList
 94: 04.05 01.76 MakePageList pre
 95: 04.05 01.76 PageListSources begin
 96: 04.05 01.76 PageStore::ls begin wiki.d/{$FullName}
 97: 04.19 01.80 PageStore::ls merge wiki.d/{$FullName}
 98: 04.34 01.87 PageStore::ls end wiki.d/{$FullName}
 99: 04.41 01.90 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
100: 04.42 01.91 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
101: 04.42 01.91 PageStore::ls end $FarmD/wikilib.d/{$FullName}
102: 04.52 01.96 PageListSources end count=7747
103: 04.53 01.96 PageListSort pre ret=4 order=name
104: 04.53 01.96 MakePageList items count=7747, filters=
105: 04.78 02.09 MakePageList post count=7747, readc=0
106: 04.80 02.10 PageListCache begin save key=9cece47c2c1afae4b6f07c8618ec1be7
107: 04.84 02.11 PageListCache end save
108: 04.84 02.11 PageListSort begin
109: 04.84 02.11 PageListSort sort
110: 06.29 02.90 PageListSort end
111: 06.29 02.90 MakePageList end
112: 06.38 02.95 FPLTemplate: FPLTemplateSliceList
113: 06.41 02.96 FPLTemplate: FPLTemplateFormat
114: 06.42 02.96 MarkupToHTML begin
115: 06.43 02.97 MarkupToHTML end
116: 06.43 02.97 FPLTemplate: Chain end
117: 06.43 02.97 MarkupToHTML end
118: 06.43 02.97 MarkupToHTML begin
119: 06.44 02.97 FPLTemplate: Chain begin
120: 06.44 02.97 FPLTemplate: FPLTemplateLoad
121: 06.44 02.97 FPLTemplate: FPLTemplateDefaults
122: 06.44 02.97 FPLTemplate: FPLTemplatePageList
123: 06.44 02.97 MakePageList pre
124: 06.44 02.97 PageListSources begin
125: 06.44 02.97 PageStore::ls begin wiki.d/{$FullName}
126: 06.57 03.01 PageStore::ls merge wiki.d/{$FullName}
127: 06.64 03.08 PageStore::ls end wiki.d/{$FullName}
128: 06.67 03.11 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
129: 06.68 03.11 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
130: 06.68 03.11 PageStore::ls end $FarmD/wikilib.d/{$FullName}
131: 06.72 03.15 PageListSources end count=7747
132: 06.72 03.16 PageListSort pre ret=4 order=name
133: 06.72 03.16 MakePageList items count=7747, filters=
134: 06.85 03.28 MakePageList post count=7747, readc=0
135: 06.86 03.29 PageListCache begin save key=4be26ac24aeca63048dfcb9ce7e248c7
136: 06.87 03.31 PageListCache end save
137: 06.88 03.31 PageListSort begin
138: 06.88 03.31 PageListSort sort
139: 07.70 04.08 PageListSort end
140: 07.70 04.08 MakePageList end
141: 07.75 04.12 FPLTemplate: FPLTemplateSliceList
142: 07.76 04.14 FPLTemplate: FPLTemplateFormat
143: 07.77 04.14 MarkupToHTML begin
144: 07.77 04.15 MarkupToHTML end
145: 07.77 04.15 FPLTemplate: Chain end
146: 07.77 04.15 MarkupToHTML end
147: 07.77 04.15 MarkupToHTML begin
148: 07.78 04.16 MarkupToHTML end
149: 07.78 04.16 MarkupToHTML begin
150: 07.79 04.16 MarkupToHTML end
151: 07.79 04.16 MarkupToHTML begin
152: 07.81 04.18 MarkupToHTML end
153: 07.87 04.24 MarkupToHTML end
154: 07.90 04.26 MarkupToHTML begin
155: 07.94 04.30 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
156: 07.96 04.32 ReadApprovedUrls SiteAdmin.ApprovedUrls end
157: 07.99 04.34 MarkupToHTML end
158: 07.99 04.34 MarkupToHTML begin
159: 08.00 04.36 MarkupToHTML end
160: 08.18 04.37 now