Template:Documentation/core: Difference between revisions

Content deleted Content added
imported>Davidgothberg
Using {{{doc exist|}}}. And check when to show the small box below for the doc meta-data.
imported>Davidgothberg
Adding the code for the sandbox and testcases links, instead of calling {{documentation/links}} since that one is used by {{category interwiki}} so should not show links to non-existing sandboxes.
Line 46:
<!--Check if we need the small box-->
{{#if: {{{content|}}}
| <!--Don't link the /doc page-->
| {{{doc exist|yes}}}
}}{{#switch: {{SUBJECTSPACE}}
| {{ns:TemplateUser}}
| {{ns:UserTemplate}} = add sandbox linksyes
}}
 
Line 62:
}}<!--
Add links to /sandbox and /testcases when appropriate
-->{{#switch: {{SUBJECTSPACE}}
-->{{documentation/links/sandbox}}''
| {{ns:User}}
| {{ns:Template}} =
Editors can experiment in this template's {{
#ifexist: {{{sandbox| {{FULLPAGENAME}}/sandbox }}}
| [[{{{sandbox| {{FULLPAGENAME}}/sandbox }}}|sandbox]] <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit }} edit])</small>
| sandbox <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload=Template:Documentation/preload-sandbox }} create])</small>
}} and {{
#ifexist: {{{testcases| {{FULLPAGENAME}}/testcases }}}
| [[{{{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>
}} pages.
}}''
}}
}}<noinclude>