This site is supported by donations to The OEIS Foundation.
Template:Documentation
From OeisWiki
The following documentation is located at Template:Documentation/doc. [Edit Template:Documentation/doc]
[<Purge> Template:Documentation]
[<Purge> Template:Documentation]
The {{documentation}} template either adds a link to the /doc subpage of a given template, or gives a link to create the subpage if it doesn't exist. If the /doc subpage exists it is "transcluded" (i.e. shown).
Usage
At the beginning of your template, use
<noinclude>{{documentation}}</noinclude>
We can't do this in the {{documentation}} template itself, because templates are not allowed to call themselves (MediaWiki does not allow template recursion).
Code
{{#ifexist: Template:{{{1|{{PAGENAME}}/doc}}}
| <div style="text-align: center; font-size: smaller;">The following [[Help:Documenting templates|documentation]] is located at [[Template:{{{1|{{PAGENAME}}/doc}}}]]. [{{edit|Template:{{{1|{{PAGENAME}}/doc}}}}}]{{nl}}
[{{purge|Template:{{{1|{{PAGENAME}}}}}}}]</div>{{Template:{{{1|{{PAGENAME}}/doc}}}}}
| :''This template needs [[Help:Documenting templates|documentation]] and [[Help:Categories|categorization]].'' [{{edit|Template:{{{1|{{PAGENAME}}/doc}}}|Please create the documentation subpage.}}]{{nl}}
[{{purge|Template:{{{1|{{PAGENAME}}}}}}}]
}}
