Différences entre les versions de « PipeEscape »
De Semantic MediaWiki - Sandbox
(new) |
(form) |
||
(3 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.]] |
+ | == Example 1 == | ||
; Code | ; Code | ||
<pre> | <pre> | ||
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 22 : | Ligne 23 : | ||
{| | {| | ||
|- | |- | ||
− | ! | + | ! 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>. | ||
+ | |||
+ | == Example 2 == | ||
+ | ; Code | ||
+ | <pre> | ||
+ | {{#if: {{{arg|value}}} | ||
+ | |{{#!: | ||
+ | {| | ||
+ | |- | ||
+ | ! Heading Identifier || Heading Value 1 || Heading Value 2 | ||
+ | |- | ||
+ | | Row a || a1 || a2 | ||
+ | |- | ||
+ | | Row b || b1 || b2 | ||
+ | |} | ||
+ | }} | ||
+ | }} | ||
+ | </pre> | ||
+ | |||
+ | ; Result | ||
+ | {{#if: {{{arg|value}}} | ||
+ | |{{#!: | ||
+ | {| | ||
+ | |- | ||
+ | ! Heading Identifier || Heading Value 1 || Heading Value 2 | ||
+ | |- | ||
+ | | Row a || a1 || a2 | ||
+ | |- | ||
+ | | 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 |