模板:Directory/doc

{{#ifeq:doc |doc

    | 

{{#ifeq:show |show

|

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

{{#ifexpr:{{#expr:{{#iferror:{{#time:U|{{{date}}}}}|2000000000}}>=1341100800}}*{{#if:the template does not add categories to tagged pages|0|1}}*{{#ifeq:{{{nocat}}}|true|0|1}}

|模板:Error
|{{#switch:
 {{#if: 
 |     
 | {{#ifeq:模板|
   | main
   | other
   }} 
 }}

| main =

{{#ifeq:|left|}}

| other

| #default =

}}{{#ifeq:{{#titleparts:模板:Directory/doc|1}}|Template:Cleanup||{{#ifeq:{{ safesubst:#if:

 | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|模板:Directory/doc}}|1}}
 | {{ safesubst:#if:|{{{1}}}|模板:Directory/doc}}

}}|Wikipedia:Template messages||{{#ifexpr:{{#if:模板|0|1}}+{{#ifeq:no|yes|0|1}}

|{{#if:
 |{{#ifexist:Category:Wikipedia templates needing cleanup from 
   ||}}
 |[[Category:{{#if:
              |{{{5}}}|Wikipedia templates needing cleanup}}]]}}{{#if:
     |[[Category:{{{4}}}]]}}}}}}}}

}}

Usage编辑

{{#ifeq:{{ safesubst:#if:

 | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|模板:Directory/doc}}|1}}
 | {{ safesubst:#if:|{{{1}}}|模板:Directory/doc}}

}}|Wikipedia:Template messages||{{#ifexpr:{{#if:模板|0|1}}+{{#ifeq:no|yes|0|1}}

|{{#if:Templates with missing or incorrect documentation
 |{{#ifexist:Category:  Templates with missing or incorrect documentation
   ||}}
 |[[Category:{{#if:
              |{{{5}}}|}}]]}}{{#if:
     |[[Category:{{{4}}}]]}}}}}}