Différences entre les versions de « PipeEscape »
De Semantic MediaWiki - Sandbox
(add) |
(form) |
||
(2 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
Demonstrates the usage of the [[mediawikiwiki:Extension:PipeEscape|"PipeEscape" extension.]] | Demonstrates the usage of the [[mediawikiwiki:Extension:PipeEscape|"PipeEscape" extension.]] | ||
− | ; Code | + | == Example 1 == |
+ | ; Code | ||
<pre> | <pre> | ||
{{#if: {{{arg|}}} | {{#if: {{{arg|}}} | ||
Ligne 7 : | Ligne 8 : | ||
{| | {| | ||
|- | |- | ||
− | ! | + | ! Heading Identifier || Heading Value 1 || Heading Value 2 |
|- | |- | ||
− | | Row a || a1 | + | | Row a || a1 || a2 |
|- | |- | ||
− | | Row b || b1 | + | | Row b || b1 || b2 |
|} | |} | ||
}} | }} | ||
Ligne 17 : | Ligne 18 : | ||
</pre> | </pre> | ||
− | ; Result | + | ; Result |
{{#if: {{{arg|}}} | {{#if: {{{arg|}}} | ||
|{{#!: | |{{#!: | ||
{| | {| | ||
|- | |- | ||
− | ! | + | ! Heading Identifier || Heading Value 1 || Heading Value 2 |
|- | |- | ||
− | | Row a || a1 | + | | Row a || a1 || a2 |
|- | |- | ||
− | | Row b || b1 | + | | Row b || b1 || b2 |
|} | |} | ||
}} | }} | ||
}} | }} | ||
+ | Nothing is shown since the <code>#if</code> parser function gets no value via <code><nowiki>{{{arg|}}}</nowiki></code>. | ||
− | ; Code | + | == Example 2 == |
+ | ; Code | ||
<pre> | <pre> | ||
{{#if: {{{arg|value}}} | {{#if: {{{arg|value}}} | ||
Ligne 37 : | Ligne 40 : | ||
{| | {| | ||
|- | |- | ||
− | ! | + | ! Heading Identifier || Heading Value 1 || Heading Value 2 |
|- | |- | ||
− | | Row a || a1 | + | | Row a || a1 || a2 |
|- | |- | ||
− | | Row b || b1 | + | | Row b || b1 || b2 |
|} | |} | ||
}} | }} | ||
Ligne 47 : | Ligne 50 : | ||
</pre> | </pre> | ||
− | ; Result | + | ; Result |
{{#if: {{{arg|value}}} | {{#if: {{{arg|value}}} | ||
|{{#!: | |{{#!: | ||
{| | {| | ||
|- | |- | ||
− | ! | + | ! Heading Identifier || Heading Value 1 || Heading Value 2 |
|- | |- | ||
− | | Row a || a1 | + | | Row a || a1 || a2 |
|- | |- | ||
− | | Row b || b1 | + | | Row b || b1 || b2 |
|} | |} | ||
}} | }} |
Dernière version du 23 janvier 2019 à 19:59
Demonstrates the usage of the "PipeEscape" extension.
Example 1
- Code
{{#if: {{{arg|}}} |{{#!: {| |- ! Heading Identifier || Heading Value 1 || Heading Value 2 |- | Row a || a1 || a2 |- | Row b || b1 || b2 |} }} }}
- Result
Nothing is shown since the #if
parser function gets no value via {{{arg|}}}
.
Example 2
- Code
{{#if: {{{arg|value}}} |{{#!: {| |- ! Heading Identifier || Heading Value 1 || Heading Value 2 |- | Row a || a1 || a2 |- | Row b || b1 || b2 |} }} }}
- Result
Heading Identifier | Heading Value 1 | Heading Value 2 |
---|---|---|
Row a | a1 | a2 |
Row b | b1 | b2 |