Template:Documentation: Difference between revisions

From All things Canadian tennis
Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude><includeonly>
<onlyinclude><includeonly>
<div style="border:1px solid #bbbbbb; border-radius: .1em; -moz-border-radius: .1em; -webkit-border-radius: .1em; background-color:#efefef; margin: .5em; padding: .5em;">
<div style="border:1px solid #aaaaaa; background-color:#fafafa; padding:10px;">
<div style="padding-bottom: 3px; border-bottom: 1px solid #AAAAAA; margin-bottom: 1ex;"><!--
<div style="padding-bottom: 3px; border-bottom: 1px solid #aaaaaa; margin-bottom: 1ex;"><!--
-->[[File:Template-info.png|50px]] <span style="font-weight: bold; font-size: 125%; margin-right:10px;">Documentation</span><!--
-->[[File:Template-info.png|50px]] <span style="font-weight:bold; font-size:125%; margin-right:10px;">Documentation</span><!--
-->{{#ifeq: {{SUBPAGENAME}} | doc |<!-- nothing -->|<!--
-->{{#ifeq: {{SUBPAGENAME}} | doc |<!-- nothing -->|<!--
-->{{#ifexist:Template:{{{1|{{PAGENAME}}}}}/doc|<span style="font-size:90%">''The documentation below is transcluded from [[Template:{{{1|{{PAGENAME}}}}}/doc]]. ({{FULLPAGENAMEE:Template:{{{1|{{PAGENAME}}}}}}}/doc|action{{=}}edit|text=edit}} {{!}} {{FULLPAGENAMEE:Template:{{{1|{{PAGENAME}}}}}}}/doc|action{{=}}history|text=history}})''</span>|<!-- nothing -->}} }}<!--
-->{{#ifexist:Template:{{{1|{{PAGENAME}}}}}/doc|<span style="font-size:90%">''The documentation below is transcluded from [[Template:{{{1|{{PAGENAME}}}}}/doc]].''</span>|<!-- nothing -->}} }}<!--
--><div style="float: right; margin-left: 5px">[{{FULLPAGENAMEE}}|action{{=}}purge|text=purge}}]</div></div>
--><div style="float:right; margin-left: 5px"></div></div>
{{#ifexist: Template:{{{1|{{PAGENAME}}}}}/doc|{{Template:{{{1|{{PAGENAME}}}}}/doc|{{{1|}}}}}|No documentation subpage exists yet for this template. {{FULLPAGENAMEE:Template:{{{1|{{PAGENAME}}}}}}}/doc|action{{=}}edit&preload{{=}}Template:Doc/preload|text=Create one now}}.[[Category:Templates with no documentation]]}}</div></includeonly></onlyinclude>
{{#ifexist: Template:{{{1|{{PAGENAME}}}}}/doc|{{Template:{{{1|{{PAGENAME}}}}}/doc|{{{1|}}}}}}}</div></includeonly></onlyinclude>
Use this template within a template page to transclude its documentation. If the template shares the same documentation as another template, pass the other template's name as parameter 1.
Use this template within a template page to transclude its documentation. If the template shares the same documentation as another template, pass the other template's name as parameter 1.


Line 12: Line 12:
The doc transclusion should be placed at the end of the template code:
The doc transclusion should be placed at the end of the template code:


<code><nowiki><noinclude>{{doc}}</noinclude></nowiki></code><br/>
<code><nowiki><noinclude>{{documentation}}</noinclude></nowiki></code><br/>
<code><nowiki><noinclude>{{doc|templatename}}</noinclude></nowiki></code><br/>
<code><nowiki><noinclude>{{documentation|templatename}}</noinclude></nowiki></code><br/>

[[Category:Templates]]

Latest revision as of 19:14, 19 August 2020

Use this template within a template page to transclude its documentation. If the template shares the same documentation as another template, pass the other template's name as parameter 1.

Examples of usage

The doc transclusion should be placed at the end of the template code:

<noinclude>{{documentation}}</noinclude>
<noinclude>{{documentation|templatename}}</noinclude>