Difference between revisions of "Template:Diffsandbox"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
imported>Dinoguy1000
({{fullurl}} instead of the odd {{SERVER}}/wiki/... construct; rm always-empty query parameters; conditionally add rev# query parameters only if the parameters are defined; allow sandbox link to be specified, in the event a template's/module's sandbox is not at the /sandbox subpage)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[//en.wikipedia.org/wiki/Special:ComparePages?page1={{urlencode:{{{1|x}}}}}&rev1=&page2={{urlencode:{{{1|x}}}}}%2Fsandbox&rev2=&action=&diffonly=&unhide= {{#if:{{{label|}}}|{{{label|}}}|compare}}]<!--
+
[{{fullurl:Special:ComparePages|page1={{urlencode:{{{1|x}}}}}{{#if:{{{rev1|}}}|&rev1={{{rev1}}}}}&page2={{urlencode:{{#if:{{{2|}}}|{{{2}}}|{{{1|x}}}/sandbox}}}}{{#if:{{{rev2|}}}|&rev2={{{rev2}}}}}}} {{#if:{{{label|}}}|{{{label|}}}|diff}}]<!--
  
--><noinclude>
+
--><noinclude>{{documentation}}</noinclude>
{{documentation|content=This template compares the page named by parameter 1 with the /sandbox version.
 
{{para|label|any text}}  will overwrite the "compare" text.
 
===See also===
 
* {{tl|Diff}}
 
}}
 
[[Category:Wikipedia formatting and function templates]]
 
</noinclude>
 

Latest revision as of 20:44, 14 April 2019

diff

50px Template documentation[view] [edit] [history] [purge]

This template gives a link to compare a template page and its /sandbox page.

Usage

{{Diffsandbox|Template:Infobox building}}diff
  • |rev1=page id
  • |rev2=page id
  • |label=any text will overwrite the "diff" text.

See also