Template:Documentation/core

From RFC-Wiki
{{#ifeq: ¬ |

|

|
{{
 #if: 
 | 
 | 
   {{
   #if: yes
   | [edit] [[[:Template:Purge]]] 
   | 
     [#ifeq: Template | File_        | Template:Documentation/preload-filespace_        | Template:Documentation/preload_        }} create]
   }}
 }} {{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = 50px Template documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   
}}

}} {{#if: | | {{#if: yes

 | {{#if:

|

40px This is the template documentation page for Template:Documentation.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.
{{#if:x||

}} |{{#ifeq: core | doc

 | 

{{

   #ifeq: show | show
   | Template:Mbox
   }}{{
   #if: 
   | 
   | [[Category:{{
     #if: Template
     | Template
     | Article
   }} documentation]]
 }}

| }} }}

This is the {{documentation/core}} sub-template.

Do not use this template directly, use {{documentation}} instead.

Template:Tlf calls {{documentation/core2}} which in turn calls this template. This template holds most of the code for Template:Tlf, while Template:Tlf and Template:Tlf do parameter preprocessing. Thus simplifying the code.

Technical details

This sub-template currently expects these parameters:

{{documentation/core
| heading = {{{heading|¬}}}   <!--Note that the "¬" is necessary 
     so we can detect the difference between empty and undefined-->
| heading-style = {{{heading-style|}}}
| content = {{{content|}}}    <!--Text instead of a /doc page-->
| link box = {{{link box|}}}  <!--So "link box=off" works-->

| docpage =     <!--Full pagename of the doc page-->
| doc exist =   <!--"yes" if the doc page exists, empty string if not-->
| docname fed = <!--"yes" if a docname was manually fed-->

| sandbox =     <!--Full pagename of the /sandbox-->
| testcases =   <!--Full pagename of the /testcases-->

| template page =   <!--Full pagename where the {{documentation}}
    template is placed, but without ending /sandbox or /testcases.
    Note: Unfortunately might not be the "correct" namespace if 
    the template is in subject space and the {{documentation}} 
    template is in talk space or the other way around.-->
}}

For more documentation see {{documentation}}.


 }}

}}

{{#if:

 {{#ifeq:  | off
 |
 | yes{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}

|

{{#ifeq:none|none | | }} {{#if: |

}}

{{#switch:

| | warning | editnotice | system =

| #default =

This message box is using an invalid "type=" parameter and needs fixing.

[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Documentation/core]]

}} }}{{#if:

 {{#switch: core
 | doc
 | testcases = strange
 }}

|

}}

{{#ifeq:{{#switch:{{#switch:{{#ifeq:-|-sysop|move|}}

  |semi
  |autoconfirmed=semi
  |administrator
  |full
  |sysop=indef
  |move=move
  |#default=indef}}
 |move={{#ifeq:
     {{#switch:{{#ifeq:documentation/core/template|core/template|undefined|{{#ifeq:core|sandbox|sysop|undefined}}}}
       |semi
       |autoconfirmed=autoconfirmed
       |administrator
       |full
       |sysop=sysop
       |undefined=
       |#default=}}
     |sysop|yes|no
   }}
 |create={{#if:
     {{#switch:{{#ifeq:documentation/core/template|core/template|undefined|{{#ifeq:core|sandbox|sysop|undefined}}}}
       |semi
       |autoconfirmed=autoconfirmed
       |administrator
       |full
       |sysop=sysop
       |undefined=
       |#default=}}
     |yes|no
   }}

|#default={{#if:

     {{#switch:{{#ifeq:documentation/core/template|core/template|undefined|{{#ifeq:core|sandbox|sysop|undefined}}}}
       |semi
       |autoconfirmed=autoconfirmed
       |administrator
       |full
       |sysop=sysop
       |undefined=
       |#default=}}
     |{{#ifeq:{{#switch:
                |semi
                |autoconfirmed=autoconfirmed
                |administrator
                |full
                |sysop=sysop
                |#default=}}
        |{{#switch:{{#ifeq:documentation/core/template|core/template|undefined|{{#ifeq:core|sandbox|sysop|undefined}}}}
           |semi
           |autoconfirmed=autoconfirmed
           |administrator
           |full
           |sysop=sysop
           |undefined=
           |#default=}}
        |no|yes
      }}
  |no}}

}}|yes|{{#ifeq:yes|yes|

| Template:Mbox }}|}}{{#ifeq:{{#ifeq:template|template|{{#switch:{{#ifeq:-|-sysop|move|}}

  |semi
  |autoconfirmed={{#ifeq:|sysop|}}
  |move=
  |administrator
  |full
  |sysop
  |#default=}}}}{{#ifeq:template|file|[[category:{{#switch:
  |semi
  |autoconfirmed=semi-protected
  |administrator
  |full
  |sysop
  |#default=protected}} images|documentation/core]]}}|no||{{#ifeq:Template|Template|{{#switch:{{#ifeq:-|-sysop|move|}}
  |semi
  |autoconfirmed={{#ifeq:|sysop|}}
  |move=
  |administrator
  |full
  |sysop
  |#default=}}}}{{#ifeq:Template|File|[[Category:{{#switch:
  |semi
  |autoconfirmed=Semi-protected
  |administrator
  |full
  |sysop
  |#default=Protected}} images|Documentation/core]]}}}}