Difference between revisions of "Template:Transclude/doc"

From Define Wiki
Jump to navigation Jump to search
m (1 revision)
 
(No difference)

Latest revision as of 12:30, 14 June 2012

{{#ifeq: doc | doc

 | 

{{

   #ifeq: show | show
   | {{
 {{#switch:
 {{#if: 
   | 
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = ambox | talk = tmbox | user = ombox | wikipedia = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | book = ombox | other | #default = ombox

}} | type = notice | image = 40px | imageright = | class = | style = | textstyle = | text = This is a documentation subpage for Template:Transclude.
It contains usage information, categories, interlanguage links 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}}}}}}}}. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = }}

   }}{{
   #if: 
   | 
   | {{#ifexist:Template:Transclude|[[Category:{{
     #switch: Template
     | Template  = Template
     | User      = User
     | #default  = Wikipedia
   }} documentation pages]]|}}
 }}

| }} {{#ifeq:|yes

|

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

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

 | 
|
 }}

}}

{{#switch:content

| | speedy | delete | content | style | move | protection | notice =

| #default =

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

}}

|

{{#ifeq:|none | | }}

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

 | 
|
 }}

}}

{{#switch:content

| | speedy | delete | content | style | move | protection | notice =

| #default =

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

}} }}

This template resolves page names as they would be handled by MediaWiki's template-transclusion process. It thereby removes ambiguity when doing other things with template pagenames, e.g. linking.

The most prominent use of this template is in the

menu used at the top of each {{navbox}}, though it is used in other templates as well, such as {{usbk}}.

Usage

  • {{transclude| Template:Foo }}{{#switch: Template
|#default = Template:Foo 
| = 
   {{#ifeq: Template | 
     | Template:Template:Foo            
     | Foo      
   }}

}}

  • {{transclude| Category:Foo }}{{#switch: Category
|#default = Category:Foo 
| = 
   {{#ifeq: Category | 
     | Template:Category:Foo            
     | Foo      
   }}

}}

  • {{transclude| Foo }}{{#switch:
|#default = Foo 
| = 
   {{#ifeq:  | 
     | Template:Foo            
     | Foo      
   }}

}}

  • {{transclude| :Foo }}{{#switch:
|#default = Foo 
| = 
   {{#ifeq:  | Template
     | Template::Foo            
     | Foo      
   }}

}}

  • {{transclude| :File:Foo }}{{#switch: File
|#default = File:Foo 
| = 
   {{#ifeq: File | Template
     | Template::File:Foo            
     | Foo      
   }}

}}

See also