Template:Documentation/core: Difference between revisions

Content deleted Content added
imported>Davidgothberg
If "content" fed, don't link the /doc page. (Good thing I do detailed testing.)
imported>Davidgothberg
Revert my last edit and fix some related code: The doc of {{documentation}} shows a case when "content" is fed AND the /doc links are needed. So back to linking the /doc page if it exists.
Line 45:
-->{{#if:
<!--Check if we need the small box-->
{{#if: {{{contentdoc exist|yes}}}{{
}}{{#switch: {{SUBJECTSPACE}}
| <!--Don't link the /doc page-->
| {{{doc exist|yes}}}
}}{{#switch: {{SUBJECTSPACE}}
| {{ns:User}}
| {{ns:Template}} = yes
Line 57 ⟶ 55:
| style = background-color: #ecfcf4;
| text =
''{{#if: {{{contentdoc exist|yes}}}
| <!--Don't/doc exists, link the /docto pageit-->
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>
| {{#if: {{{doc exist|yes}}}
| <!--/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>
}}
}}<!--
Add links to /sandbox and /testcases when appropriate
-->{{#switch: {{SUBJECTSPACE}}
| {{ns:User}}