Template:Documentation/core: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
imported>Davidgothberg
Adding the "link box = off" parameter.
imported>Davidgothberg
Using the heading "Summary" instead of "Documentation" when in File space. Adding "Add categories and interwikis to the /doc". Adding link "Subpages of this template". Adding debug-reporting to a cat.
Line 17: Line 17:
}} <span style="{{#if: {{{heading-style|}}}
}} <span style="{{#if: {{{heading-style|}}}
| {{{heading-style|}}}
| {{{heading-style|}}}
| {{#ifeq: {{NAMESPACE}} | {{ns:Template}}
| {{#ifeq: {{SUBJECTSPACE}} | {{ns:Template}}
| font-weight: bold; font-size: 125%
| font-weight: bold; font-size: 125%
| font-size: 150%
| font-size: 150%
Line 24: Line 24:
| ¬ =
| ¬ =
<!--"heading" not defined in this or previous level-->
<!--"heading" not defined in this or previous level-->
{{#ifeq: {{NAMESPACE}} | {{ns:template}}
{{#switch: {{SUBJECTSPACE}}
| [[Image:Template-info.svg|50px]] Template documentation
| {{ns:Template}} = [[Image:Template-info.svg|50px]] Template documentation
| Documentation
| {{ns:File}} = Summary
| #default = Documentation
}}
}}
| #default =
| #default =
Line 34: Line 35:
}}<!--
}}<!--
Load the /doc content:
Load the /doc content:
Note: The line break between this comment and the if-case
Note: The line breaks between this comment and the if-case
and between the if-case and the following div are necessary so
is necessary, it makes it so "=== Headings ===" at
start of docs are interpreted.
"=== Headings ===" at the start and end of docs are interpreted.
-->
-->
{{#if: {{{content|}}}
{{#if: {{{content|}}}
Line 44: Line 45:
}}
}}
}}
}}
<div style="clear: both;"></div>
<div style="clear: both;"></div><!--So right or left floating items don't stick out of the doc box.-->
</div><!--End of green doc box--><!--
</div><!--End of green doc box--><!--
Small box below for the doc meta-data.
Small box below for the doc meta-data.
Line 62: Line 63:
| image = none
| image = none
| style = background-color: #ecfcf4;
| style = background-color: #ecfcf4;
| textstyle = font-style: italic;
| text =
| text =
''{{#if: {{{doc exist|yes}}}
{{#if: {{{doc exist|yes}}}
| <!--/doc exists, link to it-->
| <!--/doc exists, link to it-->
The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{docpage|{{FULLPAGENAME}}/doc}}}]]. <small style="font-style: normal">([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit] &#124; [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history])</small> <br>
The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{docpage|{{FULLPAGENAME}}/doc}}}]]. <small style="font-style: normal">([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit] &#124; [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history])</small> <br>
Line 79: Line 81:
| [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])</small>
| [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])</small>
| testcases <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&preload=Template:Documentation/preload-testcases }} create])</small>
| testcases <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&preload=Template:Documentation/preload-testcases }} create])</small>
}} pages.
}} pages. <br>
}}{{#if: {{{content|}}} {{{docname fed|}}}
}}''
|
| Add categories and interwikis to the /doc subpage.
}} [[Special:PrefixIndex/{{{template page|{{FULLPAGENAME}}}}}/|Subpages of this template]].
}}
}}
}}<!--
Detect and report strange usage:
-->{{#if:
<!--Check if there are /doc, /sandbox and /testcases in talk space
when they should be in subject space, and the other way around-->
{{#ifexist:
{{{not-docspace|}}}:{{PAGENAME:{{{template page|{{FULLPAGENAME}}}}}}}/doc
| strange
}}{{#ifexist:
{{{not-docspace|}}}:{{PAGENAME:{{{template page|{{FULLPAGENAME}}}}}}}/sandbox
| strange
}}{{#ifexist:
{{{not-docspace|}}}:{{PAGENAME:{{{template page|{{FULLPAGENAME}}}}}}}/testcases
| strange
}}
<!--Check if {{documentation}} is transcluded
on a /doc or /testcases page-->
{{#switch: {{SUBPAGENAME}}
| doc
| testcases = strange
}}

| [[Category:Wikipedia pages with strange ((documentation)) usage|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<noinclude>
}}<noinclude>



Revision as of 18:20, 11 February 2010

[edit] [Purge] Template documentation

Template:Documentation/core/doc

The above documentation is transcluded from Template:Documentation/core/doc. (edit | history)
Editors can experiment in this template's sandbox (create) and testcases (create) pages.
Add categories and interwikis to the /doc subpage. Subpages of this template.

Template:Pp-template