模板:Convert to template/doc

{{#ifeq:doc |doc

    | 

{{#ifeq:show |show

|

        }}{{#if: |
         |   {{#ifexist:模板:Convert to template
                  | [[Category:{{#switch:模板 |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  |
                 }}
        }}
    | 
   }}

This template tags articles or sections that use raw wikicode in place of a template designed to do the same thing. Often, templates provide category checks, accessability tracking and standardization between articles, and may be more beneficial to an article than using raw wikicode.

Usage编辑

This template can refer to a section (or another article part), instead of the default article:

{{Convert to template|section}}
{{Convert to template|1=paragraph}}
{{Convert to template|1=paragraph|template=Episode list}}

This template can be dated:

{{Convert to template|date=6月 2024}}
{{Convert to template|section|date=6月 2024}}
{{Convert to template|section|template=Episode list|date=6月 2024}}

If the date is left off a bot will add it.

TemplateData编辑

{{#if:|{{#switch:
|={{#ifeq:{{safesubst:#switch: {{{lc}}}
|no
|n
|f
|false
|off
|0        = no
|         = no
|¬        = no
|yes
|y
|t
|true
|on
|1        = yes
|#default = no

}}|no|S|s}}ee the monthly parameter usage report for {{#if:|[[Template:]]|this template}}.

|None|none=Parameter usage report
|for|For=Parameter usage report for {{#if:|[[Template:]]|Template:Convert to template}}.
|#default=[1]

}}|This is the {{#if:|TemplateData|TemplateData}} documentation for this template used by VisualEditor and other tools; {{#switch:

|={{#ifeq:{{safesubst:#switch: yes
|no
|n
|f
|false
|off
|0        = no
|         = no
|¬        = no
|yes
|y
|t
|true
|on
|1        = yes
|#default = no

}}|no|S|s}}ee the monthly parameter usage report for {{#if:|[[Template:]]|this template}}.

|None|none=Parameter usage report
|for|For=Parameter usage report for {{#if:|[[Template:]]|Template:Convert to template}}.
|#default=[2]

}}}}

TemplateData for Convert to template

{{#switch:

 {{#if:
 | {{{demospace}}}    
 | {{#ifeq:模板|模板
   | template
   | other
   }}
 }}

| template = {{#if:{{#ifeq:doc|sandbox|1}}{{#ifeq:doc|doc|1}}||

}} | other | #default = }} <templatedata> {

   "params": {
       "1": {
           "label": "Scope (e.g. section)",
           "description": "This parameter allows an editor to replace the default word \"article\" with another word, usually \"section\" or \"paragraph\"",
           "type": "content"
       },
       "template": {
           "label": "Template name",
           "description": "Set to the name of a template that the raw wikicode can be converted to.",
           "example": "yes",
           "type": "content",
           "autovalue": ""
       },
       "date": {
           "label": "Month and year",
           "description": "Month and year of tagging; e.g., 'January 2013', but not 'jan13'",
           "type": "string",
           "autovalue": "{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}",
           "suggested": true
       }
   },
   "description": "For tagging articles that use raw wikicode instead of a relevant template.",
   "format": "inline"

} </templatedata>