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 1
+
== Example 1 ==
 +
; Code
 
<pre>
 
<pre>
 
{{#if: {{{arg|}}}
 
{{#if: {{{arg|}}}
Ligne 7 : Ligne 8 :
 
{|
 
{|
 
|-
 
|-
!       || Heading 1 || Heading 2
+
! Heading Identifier || Heading Value 1 || Heading Value 2
 
|-
 
|-
| Row a || a1       || a2
+
| Row a || a1 || a2
 
|-
 
|-
| Row b || b1       || b2
+
| Row b || b1 || b2
 
|}
 
|}
 
}}
 
}}
Ligne 17 : Ligne 18 :
 
</pre>
 
</pre>
  
; Result 1
+
; Result
 
{{#if: {{{arg|}}}
 
{{#if: {{{arg|}}}
 
  |{{#!:
 
  |{{#!:
 
{|
 
{|
 
|-
 
|-
!       || Heading 1 || Heading 2
+
! Heading Identifier || Heading Value 1 || Heading Value 2
 
|-
 
|-
| Row a || a1       || a2
+
| Row a || a1 || a2
 
|-
 
|-
| Row b || b1       || b2
+
| Row b || b1 || b2
 
|}
 
|}
 
}}
 
}}
 
}}
 
}}
 +
Nothing is shown since the <code>#if</code> parser function gets no value via <code><nowiki>{{{arg|}}}</nowiki></code>.
  
; Code 2
+
== Example 2 ==
 +
; Code
 
<pre>
 
<pre>
 
{{#if: {{{arg|value}}}
 
{{#if: {{{arg|value}}}
Ligne 37 : Ligne 40 :
 
{|
 
{|
 
|-
 
|-
!       || Heading 1 || Heading 2
+
! Heading Identifier || Heading Value 1 || Heading Value 2
 
|-
 
|-
| Row a || a1       || a2
+
| Row a || a1 || a2
 
|-
 
|-
| Row b || b1       || b2
+
| Row b || b1 || b2
 
|}
 
|}
 
}}
 
}}
Ligne 47 : Ligne 50 :
 
</pre>
 
</pre>
  
; Result 2
+
; Result
 
{{#if: {{{arg|value}}}
 
{{#if: {{{arg|value}}}
 
  |{{#!:
 
  |{{#!:
 
{|
 
{|
 
|-
 
|-
!       || Heading 1 || Heading 2
+
! Heading Identifier || Heading Value 1 || Heading Value 2
 
|-
 
|-
| Row a || a1       || a2
+
| Row a || a1 || a2
 
|-
 
|-
| Row b || b1       || b2
+
| 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
Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.