Template:Example: Difference between revisions

m
no edit summary
imported>FrozenPlum
mNo edit summary
imported>FrozenPlum
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1:
<templatestyles src="Example/style.css" /><!--
--><includeonly><div class="demo-inputbox-wrapper">
{{#if:{{{nosandbox|}}}|<!-- has value don't display --><!-- otherwise display
-->|<div class="demo-viewpage" style="margin-top:{{{margin|}}};">
[{{fullurl:Special:Mypage/Sandbox|action=edit}}&section=new&preloadtitle={{urlencode:{{{1}}}}}&preload={{#if:{{{base|}}}|{{anchorencode:{{{base}}}}}|{{urlencode:{{FULLPAGENAME}}}}}}/{{#if:{{{noparam|}}}|<!-- not empty -->|Parameter:_}}{{{1|}}}_(example{{#if:{{{eg|}}}|_{{{eg|}}}|_1}}) {{{2|Test in sandbox}}}]
</div>}}
{{#if:{{{noresult|}}}|<!-- has value don't display --><!-- otherwise display
-->|<div class="demo-viewpage" style="margin-top:{{{margin|}}};">
[[{{#if:{{{base|}}}|{{anchorencode:{{{base}}}}}|{{FULLPAGENAME}}}}/{{#if:{{{noparam|}}}|<!-- not empty -->|Parameter:&nbsp;}}{{{1|}}} (example{{#if:{{{eg|1}}}|&nbsp;{{{eg|1}}}}})|View Result]]
</div>}}
</div></includeonly><noinclude>
 
==Tests==
Line 20:
 
<li value="3"><code><nowiki>{{example|category|base=Criteria for page selection|eg=2|noresult=y}}</nowiki></code> gives: {{example|category|base=Criteria for page selection|eg=2|noresult=y}}</li>
 
 
<li value="4"><code><nowiki>{{example|category|base=Criteria for page selection|Link Text|eg=2|noresult=y|margin=.5em}}</nowiki></code> gives: {{example|category|base=Criteria for page selection|Link Text|eg=2|noresult=y|margin=.5em}}</li>
</ol>
 
Anonymous user