This site is supported by donations to The OEIS Foundation.

Template:Documentation/doc

From OeisWiki
Jump to: navigation, search

This documentation subpage contains instructions, categories, or other information for Template:Documentation. [<Edit> Template:Documentation]

[⧼Purge⧽ Template:Documentation/doc]

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}}}}}}}]
}}

Issue

The edit and purge links are not right when there is an apostrophe ' in the page name. (Template needs to be debugged.)[1] (Check Template:Plouffe's Inverter and Template:Plouffe's Inverter/doc.)

See also

Notes

  1. Template needs to be debugged.