Revision as of 13:59, 20 January 2022 by thedartswiki>MusikBot II
{{#ifeq:Testcases other|testcases||}}
{{#ifeq:testcases other |doc
|
{{#ifeq:show |show
|
Template:Strong for Template:Testcases other {{#if:||.}} It contains usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}.
}}{{#if: |
| {{#ifexist:Template:Testcases other
| [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
|
}}
}}
|
}}
Usage
Similar to {{Sandbox other}} :
If the subpagename is /testcases, returns |{{SAFESUBST:#if:1|1=}}, else |{{SAFESUBST:#if:2|2=}}.
See also
{{Sandbox other }} — Distinguishes between the /sandbox subpages and the root template page and other subpages.
{{Testcases other }} — Distinguishes between the /testcases subpages and the root template page and other subpages.
{{Template other }} — Distinguishes between pages in the template namespace and other namespaces.
{{When on basepage }} — Distinguishes between the root template page and subpages, without special consideration in the mainspace.
{{Subpage other }} — Distinguisheds between the root page and subpages (any subpage), classifying pagenames in the mainspace with a slash as being the root page.
Namespace and pagename-detecting templates
Namespace
Particular
{{#if:{{#ifeq:Main other%|Main other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Main other
}}
{{#if:{{#ifeq:Talk other%|Talk other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Talk other
}}
{{#if:{{#ifeq:Category other%|Category other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Category other
}}
{{#if:{{#ifeq:Draft other%|Draft other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Draft other
}}
{{#if:{{#ifeq:File other%|File other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| File other
}}
{{#if:{{#ifeq:Is Commons%|Is Commons%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Is Commons
}}
{{#if:{{#ifeq:Help other%|Help other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Help other
}}
{{#if:{{#ifeq:Module other%|Module other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Module other
}}
{{#if:{{#ifeq:Portal other%|Portal other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Portal other
}}
{{#if:{{#ifeq:Template other%|Template other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Template other
}}
{{#if:{{#ifeq:User other%|User other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| User other
}}
{{#if:{{#ifeq:Project other%|Project other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Project other
}}
{{#if:{{#ifeq:Single namespace%|Single namespace%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Single namespace
}}
{{#if:{{#ifeq:If talkspace of%|If talkspace of%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| If talkspace of
}}
{{#if:{{#ifeq:If usertalk of%|If usertalk of%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| If usertalk of
}}
More generic
{{#if:{{#ifeq:Namespace detect%|Namespace detect%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Namespace detect
}}
{{#if:{{#ifeq:Namespace detect showall%|Namespace detect showall%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Namespace detect showall
}}
{{#if:{{#ifeq:Main talk other%|Main talk other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Main talk other
}}
{{#if:{{#ifeq:Main talk other flex%|Main talk other flex%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Main talk other flex
}}
{{#if:{{#ifeq:Talkspace detect%|Talkspace detect%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Talkspace detect
}}
Pagename
{{#if:{{#ifeq:When on basepage%|When on basepage%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| When on basepage
}} Detects and acts according to whether it is on a basepage or on any subpage (that is, a ../.. subpage).
{{#if:{{#ifeq:When pagename is%|When pagename is%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| When pagename is
}} For pattern matching on the pagename.
Module:Page Can take apart and put together pagenames in several ways.
{{#if:{{#ifeq:IP-talk%|IP-talk%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| IP-talk
}} Returns IP-user talkpage, registered-user talkpage or non-user talkpage.
{{#if:{{#ifeq:IP-user other%|IP-user other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| IP-user other
}} For detecting IP-user pages.
{{#if:{{#ifeq:Subpage other%|Subpage other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Subpage other
}} Pagename has an after-slash part (not in mainspace)
{{#if:{{#ifeq:Sandbox other%|Sandbox other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Sandbox other
}} Page is subpage /sandbox (template space)
{{#if:{{#ifeq:Testcases other%|Testcases other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Testcases other
}} Page is subpage /testcases (template space)
{{#if:{{#ifeq:Rootpage other%|Rootpage other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Rootpage other
}} Page is rootpage (vs. /subpage) (template space)
Others
{{#if:{{#ifeq:Stub other%|Stub other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Stub other
}} Detects whether it is on a page with a stub template or not.
{{#if:{{#ifeq:Redirect other%|Redirect other%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Redirect other
}} Detects whether it is on a redirect or not.
{{#if:{{#ifeq:If preview%|If preview%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| If preview
}} Detects whether page is viewed as a preview or not.
{{#if:{{#ifeq:If IP%|If IP%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| If IP
}} Displays different content to IP users and logged-in users.
{{#if:{{#ifeq:If autoconfirmed%|If autoconfirmed%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| If autoconfirmed
}} Displays different content to autoconfirmed and non-autoconfirmed users.
{{#if:{{#ifeq:If extended confirmed%|If extended confirmed%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| If extended confirmed
}} Displays different content to extended confirmed and non-extended confirmed users.
{{#if:{{#ifeq:If administrator%|If administrator%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| If administrator
}} Displays content only to admins.
{{#if:{{#ifeq:If mobile%|If mobile%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| If mobile
}} Displays different content to mobile users and desktop users.
{{#if:{{#ifeq:Noscript%|Noscript%||yes}}
| [[Template:{{{2}}}|{{{2}}} ]]
| Noscript
}} Detects whether page is viewed with a JavaScript-capable client or not.
{{#if:{{#ifeq:Testcas|sandbox|1}}{{#ifeq:Testcases other|doc|1}}||
}}