Template:Doc/sandbox: Difference between revisions
Jump to navigation
Jump to search
== Header ==
(Testing the use of MultiPage for doc pages.) |
No edit summary |
||
(122 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
< | {{doc/sandbox|DocParam1=1|DocParam2=2}} | ||
| | <includeonly> | ||
|{{# | <onlyinclude>{{Doc/templateusecategory}}{{#if:{{{content|}}}|[[Category:Documentation using content parameter]]}}{{ulf|all-lang=1}}{{#switch:{{{1|}}} | ||
| #default = | |||
<div style="clear:both; margin-top:1em; border:1px solid #505050; background-color:#323232; border-radius:2px"><!-- | |||
{{#switch:{{{tools|}}}|#default= | --><div style="width:100%"><!-- | ||
--><div style="display:flex; gap:8px; background:#505050; padding:6px 6px 6px 10px; flex-direction:{{#switch:{{Intlang}}|he=row-reverse| align=right|#default=row}}"><!-- | |||
| | --><div style="display:flex; flex-direction:{{#switch:{{Intlang}}|he=row-reverse|#default=row}}; align-items:center; font-size:1.2em; color:#D8D8D8;"><!-- | ||
-->{{#switch:{{{pagespace|{{SUBJECTSPACE}}}}} | |||
| #default = {{Doc/strings|documentation}} | |||
| Template = <span style="{{#switch:{{Intlang}}|he=padding-left|#default=padding-right}}:6px;pointer-events:none;user-select:none;">[[File:Curly_brackets_white.png|32px|link=]]</span><!-- | |||
-->{{#if:{{AVAILABLEDOCPAGENAME|{{{docpage|}}}}} | |||
| [[{{AVAILABLEDOCPAGENAME|{{{docpage|}}}}}|{{Doc/strings|TemplateDoc}}]] | |||
| [[{{DOCPAGENAME|{{{docpage|}}}}}|{{Doc/strings|TemplateDoc}}]] | |||
}} <!-- | |||
-->{{#if: {{AVAILABLEDOCPAGENAME|translated=1|{{{docpage|}}}}} | |||
| [{{PageCreateLink|create={{DOCPAGENAME|{{{docpage|}}}}}|alt={{lc:{{int:Edit}}}}}}] | |||
| {{#if: {{AVAILABLEDOCPAGENAME|{{{docpage|}}}}} | |||
| [{{PageCreateLink|create={{BASEDOCPAGENAME|{{{docpage|}}}}}|alt={{lc:{{int:Edit}}}}}}]<!-- | |||
--> [{{PageCreateLink|create={{DOCPAGENAME|{{{docpage|}}}}}|preload=Doc/preload{{intlang|pref=/}}|alt={{lc:{{int:create}}}}}} {{Flag|{{intlang}}}}] | |||
| [{{PageCreateLink|create={{DOCPAGENAME|{{{docpage|}}}}}|preload=Doc/preload{{intlang|pref=/|default-none=1}}|alt={{lc:{{int:create}}}}}}] | |||
}} | |||
}} | |||
| File = {{Doc/strings|Summary}} | |||
| User = {{Doc/strings|About}} | |||
}}</div><!-- | |||
--><div style="display:flex; gap:6px; margin-left:auto"><!-- | |||
------------------------------ Language button ------------------------------ | |||
--><div class="mw-customtoggle-language" style="display:inline-flex; justify-content:center; align-items:center; height:100%; box-sizing:border-box; background:#323232; border:1px solid rgba(255,255,255,.3); border-radius:2px; user-select:none; padding:0 4px">[[File:Icon-translate.png|link=|14px]] Available doc translations </div><!-- | |||
-->{{#switch:{{{tools|}}} | |||
| #default = {{#if:{{PROTECTIONEXPIRY:edit|{{{docpage|{{FULLPAGENAME}}/doc}}}{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}} }} }} | |||
|<!-- | |||
------------------------------ view button ------------------------------ | |||
-->{{#if:{{{content{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}} }}| }}} | |||
| | |||
|<div style="display:inline-flex; justify-content:center; align-items:center; height:100%; box-sizing:border-box; background:#323232; border:1px solid rgba(255,255,255,.3); border-radius:2px; user-select:none; padding:0 4px"><!-- | |||
--><div style="position: relative; top: -1.5px; "><!-- | |||
-->[[File:Icon-visibility.png|14px|link={{{docpage|{{FULLPAGENAME}}/doc}}}{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}} }}|{{int:view}}]]<!-- | |||
--></div><!-- | |||
--></div><!-- | |||
------------------------------ history button ------------------------------ | |||
--><div style="display:inline-flex; justify-content:center; align-items:center; height:100%; box-sizing:border-box; background:#323232; border:1px solid rgba(255,255,255,.3); border-radius:2px; user-select:none; padding:0 4px"><!-- | |||
--><div style="position: relative; top: -1.5px; "><!-- | |||
-->[[File:Icon-history.png|14px|link={{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}} }}|action=history}}|{{int:history}}]]<!-- | |||
--></div><!-- | |||
--></div><!-- | |||
-->}}<!-- ##### if:PROTECTIONEXPIRY ##### | |||
-->}}<!-- ##### if:CONTENT ##### | |||
------------------------------ more options button (...) ------------------------------ | |||
-->{{#switch:{{{tools|}}} | |||
| #default = <div class="mw-customtoggle-doctools" style="display:inline-flex; justify-content:center; align-items:center; height:100%; box-sizing:border-box; background:#323232; border:1px solid rgba(255,255,255,.3); border-radius:2px; user-select:none; padding:0 4px">'''…'''</div> | |||
|1= | |||
}}<!-- ##### switch:TOOLS (2) ##### --></span> | |||
|0= | |||
}}<!-- ##### switch:TOOLS (1) ##### | |||
--></div><!-- | |||
--></div><!-- | |||
--></div><!-- | |||
------------------------------ dropdown area ------------------------------ | |||
--><div style="padding:0.4em 1em;"><!-- | |||
--><div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-doctools" style="display:none; overflow:hidden; background:#404040; border:1px solid rgba(255, 255, 255, 0.1); border-radius:4px; box-shadow:0 10px 20px rgb(0,0,0,.3); user-select:text; position:absolute; z-index:1001; right:8px; "><!-- | |||
--><div style="overflow-y:auto;max-height:200px;padding:2px 6px; "><span class="plainlinks"><!-- | |||
--><div>[[File:Icon-visibility.png|16px|link=]] [[Special:PrefixIndex/{{FULLPAGENAME}}/|{{Doc/strings|Subpages}}]]</div><!-- | |||
--><div>[[File:Strings icon.png|16px|link=]] [{{fullurl:{{FULLPAGENAME}}/strings|{{#if:{{PROTECTIONEXPIRY:edit|{{FULLPAGENAME}}/strings}}||action=edit&preload={{urlencode:Template:Strings subpage/preload}}}}}} {{Doc/strings|Strings}}]</div><!-- | |||
--><div>{{#switch:{{{tools|}}}|#default=[[File:Icon-sandbox.png|16px|link=]] {{#if:{{PROTECTIONEXPIRY:edit|{{FULLPAGENAME}}/sandbox}}| [[{{FULLPAGENAME}}/sandbox|{{Doc/strings|SandboxButton}}]] | [{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit&preload={{urlencode:{{FULLPAGENAME}} }} }} {{Doc/strings|SandboxButton}}]}}</div><!-- | |||
--><div>{{#if:{{PROTECTIONEXPIRY:edit|{{FULLPAGENAME}}/testcases}}| [[{{FULLPAGENAME}}/testcases|{{Doc/strings|Testcase}}]] |[[File:Icon-task alt.png|16px|link=]] [{{fullurl:{{FULLPAGENAME}}/testcases|action=edit}} {{Doc/strings|Testcase}}]}}|1=}}</div><!-- | |||
--></span></div><!-- | |||
--></div><!-- | |||
------------------------------ Languages area ------------------------------ | |||
--> | |||
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-language" style="display:none; overflow:hidden; background:#404040; border:1px solid rgba(255, 255, 255, 0.1); border-radius:4px; box-shadow:0 10px 20px rgb(0,0,0,.3); user-select:text; position:absolute; z-index:1000; right:{{#if:{{PROTECTIONEXPIRY:edit|{{{docpage|{{FULLPAGENAME}}/doc}}}{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}} }} }}|126px|68px}}; "><!-- | |||
--><div style="overflow-y:auto;max-height:200px;padding:2px 6px; "><span class="plainlinks"><!-- | |||
******************** TODO: Probably do a for each thing for flags ******************** | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|en|English|content={{{content|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|eo|Esperanto|content={{{content/eo|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|ca|Catalan|content={{{content/ca|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|cs|Czech|content={{{content/cs|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|de|German|content={{{content/de|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|es|Spanish|content={{{content/es|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|et|Estonian|content={{{content/et|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|fr|French|content={{{content/fr|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|hr|Croatian|content={{{content/hr|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|hu|Hungarian|content={{{content/hu|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|it|Italian|content={{{content/it|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|nl|Dutch|content={{{content/nl|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|no|Norwegian|content={{{content/no|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|pl|Polish|content={{{content/pl|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|pt|Portuguese|content={{{content/pt|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|pt-br|Brazilian Portuguese|content={{{content/pt-br|}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|ru|Russian|content={{{content|ru}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|uk|Ukrainian|content={{{content|uk}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|sv|Swedish|content={{{content|sv}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|tr|Turkish|content={{{content|tr}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|ja|Japanese|content={{{content|ja}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|vi|Vietnamese|content={{{content|vi}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|zh|Chinese|content={{{content|zh}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|zh-tw|Taiwanese Mandarin|content={{{content|zh-tw}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|ko|Korean|content={{{content|ko}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|ka|Georgian|content={{{content|ka}}}}}</div><!-- | |||
--><div>{{Doc/flag|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}|show-lang-name=1|he|Hebrew|content={{{content|he}}}}}</div><!-- | |||
--></span></div><!-- | |||
--></div><!-- | |||
-->{{#if: {{PROTECTIONEXPIRY:edit|{{{docpage|{{FULLPAGENAME}}/doc}}}{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}}}} | |||
| | |||
| {{metanotice | |||
|id=[[File:Info.png|45px]] | |||
|rgb=0, 127, 242 | |||
|style=padding:7px;margin-top:14px; background: rgba(0,127,242,0.1); border-radius: 5px; border: 2px solid rgba(0,127,242,0.3) | |||
|text={{Doc/strings|PageNotExist|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}}} | |||
}} | |||
}}<!-- | |||
-->{{#if: {{PROTECTIONEXPIRY:edit|{{FULLPAGENAME}}/strings}} | |||
| {{Strings notice|TempDoc=1}}{{ {{FULLPAGENAME}}/strings|String info }} | |||
}}<!-- | |||
-->{{#if: {{PROTECTIONEXPIRY:edit|{{FULLPAGENAME}}/testcases}} | |||
| {{Testcase notice|TempDoc=1}} | |||
}}<!-- | |||
-->{{#if: {{{content{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}}|}}} | |||
| {{{content{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}}}}} | |||
| {{#if: {{PROTECTIONEXPIRY:edit|{{{docpage|{{FULLPAGENAME}}/doc}}}{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}}}} | |||
| {{:{{{docpage|{{FULLPAGENAME}}/doc}}}{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}}|1|0}}}} | |||
|DocParam1={{{DocParam1|}}}|DocParam2={{{DocParam2|}}}|DocParam3={{{DocParam3|}}}|DocParam4={{{DocParam4|}}}|DocParam5={{{DocParam5|}}} }} | |||
| {{:{{{docpage|{{FULLPAGENAME}}/doc}}} | |||
|DocParam1={{{DocParam1|}}}|DocParam2={{{DocParam2|}}}|DocParam3={{{DocParam3|}}}|DocParam4={{{DocParam4|}}}|DocParam5={{{DocParam5|}}} }} | |||
}}<!-- ##### if:PROTECTIONEXPIRY ##### --> | |||
}}<!-- ##### if:CONTENT ##### --> | |||
</div></div><!-- | |||
------------------------------ doc/subpage translations | switch function at first line of the template ------------------------------ | |||
-->| 0 = {{Metanotice | |||
| id = [[File:Edit-copy.png|40px|link=]] | |||
| opacity =.05 | |||
| rgb = 255, 255, 255 | |||
| text = {{Doc/strings|Docsp}} | |||
</div><div class="plainlinks" style="display:flex; align-items:center; justify-content:center; margin-left:auto"><div>[{{fullurl:{{NAMESPACE}}:{{ROOTPAGENAME}}|action=purge}} <font style="display:inline-flex; background:#36C; border-radius:3px; color:#FFF; font-weight:bold; white-space:nowrap; position:relative; z-index:10; padding:6px 10px">{{Doc/strings|Purge}}</font>]</div></div></div> | |||
[[Category:Template documentation pages]] | |||
}} | }} | ||
{{ | | 1 = {{messagebox|borderstyle=|image=[[File:Sandbox.png|40px|link=]] | ||
|text= {{Doc/strings|Sandboxsp}} ([{{fullurl:Special:ComparePages|page1={{NAMESPACEE}}:{{ROOTPAGENAMEE}}&page2={{FULLPAGENAMEE}}}} {{Doc/strings|diff}}])}}[[Category:Sandbox pages]] | |||
| 2 = {{messagebox|borderstyle=|image=[[File:Sandbox Not.png|40px|link=]] | |||
|text={{Doc/strings|NotSandbox 1}}}} | |||
|small={{Doc/strings|NotSandbox 2}} | |||
| 3 = {{messagebox|borderstyle=|image=[[File:Edit-copy.png|40px|link=]] | |||
| | |text={{Doc/strings|Infosp}}}} | ||
| | | 4 = {{messagebox|borderstyle=|image=[[File:Edit-copy.png|40px|link=]] | ||
| | |text={{Doc/strings|MultiDocsp}}}}[[Category:Template documentation pages]] | ||
| | }}<!-- ##### SWITCH FUNCTION, first line of the template ##### | ||
}} | |||
{{ | -->{{#if:{{PROTECTIONEXPIRY:edit|{{{docpage|{{FULLPAGENAME}}/doc}}}{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}} | ||
|1 | |||
|0 | |||
}}<!-- ##### if:PROTECTIONEXPIRY ##### --> | |||
}}<!-- ##### INTLANG ##### --> | |||
}}<!-- ##### if:PROTECTIONEXPIRY ##### --> | |||
|<div class="plainlinks" style="background:#323232; border:1px solid #505050; border-radius:2px; padding:0.4em 1em; margin-top:1em;"><!-- | |||
-->''{{Doc/strings|transcluded|docpage={{{docpage|{{FULLPAGENAME}}/doc}}}}}''<!-- | |||
--> <small>([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}} | |||
|1 | |||
|0 | |||
}}<!-- ##### if:PROTECTIONEXPIRY ##### --> | |||
}}<!-- ##### INTLANG ##### --> | |||
|action=edit}} {{int:edit}}] {{!}} [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}{{Intlang|pref=/|default-none={{#if:{{PROTECTIONEXPIRY:edit|{{DOCPAGENAME|{{{docpage|}}}}}}} | |||
|1 | |||
|0 | |||
}}<!-- ##### if:PROTECTIONEXPIRY ##### --> | |||
}}<!-- ##### INTLANG ##### --> | |||
|action=history}} {{int:History}}])</small><br>''{{Doc/strings|Sandbox}}''</div> | |||
| | |||
}}<!-- ##### if:PROTECTIONEXPIRY ##### --></onlyinclude> | |||
</includeonly>__NOTOC__ | |||
Latest revision as of 15:52, 6 May 2025

This template uses a strings subpage
Please follow the format on this subpage(s) to add translations.
Please follow the format on this subpage(s) to add translations.
Number of strings:1
Approximate status of translation:
100%
Approximate status of translation:

Test page that uses for testing the new style of the template.
Changes made
- Added {{{DocParam1}}} ~ {{{DocParam5}}} for /doc page
- Useful for pages transcluding from a page and needing a very small change.
Example
{{Doc/sandbox|docpage=abc|DocParam1=Half-Life 2|DocParam2=hl2}}
In a /doc page:
{{ {{{DocParam1|Half-Life 2}}}|4|nt={{{DocParam2|}}} }}
- DocParam1:
Half-Life 2
- DocParam2:
HL2
Test parameters
- Param 1 is set
- Param 2 is set
The above documentation is transcluded from Template:Doc/sandbox/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.