Template:Documentation subpage/doc

From Interstellar War Wiki
Jump to navigationJump to search

{{#ifeq: doc | doc

 | 	

{{

   #ifeq: show | show	
   | {{#invoke:Message box|mbox}}	
   }}{{
   #if: 
   | 
   | {{#ifexist:Template:Documentation subpage|[[Category:{{	
     #switch: Template	
     | Template  = Template
     | Module    = Module
     | User      = User	
     | #default  = Wikidata
   }} documentation pages]]|}}	
 }}	

| }}

Usage

{{Documentation subpage}}

OR

 {{Documentation subpage|[[main page to link to]]|[[documentation to link to]]}}

This template should be placed at the top of "/doc" pages. It changes output depending on where it is viewed:

  • On a "/doc" page, it displays a box explaining template documentation and links to the template page.
  • On other pages (ie, pages transcluding the "/doc" page), it notes that the documentation is transcluded from a subpage.

Functions

In addition to the output message, the template categorizes pages to Category:Template documentation. It defaults the sort key to the page name without namespace (ie, "Foo" on "Template:Foo", so it would be sorted in categories under 'F').

See also

  • {{{{#if:|subst:}}{{#ifeq:D|:|:Documentation|{{#switch:||Template=Documentation|File|Category=Documentation|#default=Documentation}}}}{{#ifeq:x|{{{2}}}||{{{2}}}}}{{#ifeq:x|{{{3}}}||{{{3}}}}}{{#ifeq:x|{{{4}}}||{{{4}}}}}{{#ifeq:x|{{{5}}}||{{{5}}}}}{{#ifeq:x|{{{6}}}||{{{6}}}}}{{#ifeq:x|{{{7}}}||{{{7}}}}}{{#ifeq:x|{{{8}}}||{{{8}}}}}{{#ifeq:x|{{{9}}}||{{{9}}}}}{{#ifeq:x|{{{10}}}||{{{10}}}}}}}
  • Template:Documentation subpage