Iron Chariots Wiki:Templates

(Difference between revisions)
Jump to: navigation, search
(Lists of templates: sortkey (sort first!))
(easier to use if it's all transcluded here, I think (for now, anyway))
Line 35: Line 35:
 
== Lists of templates ==
 
== Lists of templates ==
  
The following pages list the templates that are currently in use on this wiki, including brief descriptions and examples of usage.
+
The following tables list the templates that are currently in use on this wiki, including brief descriptions and examples of usage.
* [[Project:Templates/Maintenance|Templates/Maintenance]] — templates for marking pages in need of attention (deletion, cleanup, etc.)
+
* [[Project:Templates/Stub|Templates/Stub]] — templates for marking short, underdeveloped articles on various topics
+
* [[Project:Templates/Navigational|Templates/Navigational]] — templates for interlinking many articles on the same subject (e.g., episodes of a TV/video series)
+
* [[Project:Templates/External|Templates/External]] — templates for easy linking to ''other'' websites (see also [[Project:Interwiki map]])
+
* [[Project:Templates/Utility|Templates/Utility]] — technical templates used mainly to make other templates
+
* [[Project:Templates/Other|Templates/Other]] — all other kinds of templates
+
  
 
See also the simple, [http://wiki.ironchariots.org/index.php?title=Special%3AAllpages&from=&namespace=10 alphabetical list of templates] and [[:Category:Templates]].
 
See also the simple, [http://wiki.ironchariots.org/index.php?title=Special%3AAllpages&from=&namespace=10 alphabetical list of templates] and [[:Category:Templates]].
 +
 +
===Maintenance templates===
 +
{{Project:Templates/Maintenance}}
 +
===Stub templates===
 +
{{Project:Templates/Stub}}
 +
===Navigational templates===
 +
{{Project:Templates/Navigational}}
 +
===External-links templates===
 +
{{Project:Templates/External}}
 +
===Utility templates===
 +
{{Project:Templates/Utility}}
 +
===Other templates===
 +
{{Project:Templates/Other}}
  
 
[[Category:Iron Chariots|Templates]]
 
[[Category:Iron Chariots|Templates]]
 
[[Category:Templates|* ]]
 
[[Category:Templates|* ]]

Revision as of 14:30, 17 April 2007

Templates are reusable portions of text and/or wiki markup that can be "included" in other pages by using the "double-braces" wiki syntax:

{{Name of template}}

The name of the template can have spaces (you don't have to replace them by _underscores_); the first letter is case insensitive (it can be capital or lower-case), but subsequent letters are case sensitive.

The content of the template is stored in the same-named page in the Template: namespace, which would be linked to using the following "double-square-brackets" syntax:

[[Template:Name of template]]

The two forms differ in that the former results in the substitution (or "transclusion") of the contents of the template page at that point in the current page (where {{...}} appears), whereas the latter simply links to the page.

Contents

Wiki markup for templates

A concrete example:

  • [[Template:Stub]] results in the link:
    Template:Stub
  • {{Stub}} — or, equivalently, {{stub}} — results in the contents of the "Stub" template being inserted into the current page:
    This article is a stub. You can help out by expanding it.

The latter form, by the way, is how you can mark extremely short articles ("stubs") that need the attention of other editors.

On the other hand:

Note that [[Stub]] and {{Stub}} have nothing to do with each other.

Transclusion of content from other namespaces

If you want to insert the contents of an article in the "main namespace" into another page (this should rarely be done in practice), add a colon immediately after the opening double-braces:

Please note: Although this feature exists, it probably shouldn't be used in articles on this wiki.

If the text in braces starts with a namespace prefix, then the contents of that page will be transcluded instead of a page in the Template: namespace:

See WikimediaMeta:Help:Template for more (much, much more) information.

Lists of templates

The following tables list the templates that are currently in use on this wiki, including brief descriptions and examples of usage.

See also the simple, alphabetical list of templates and Category:Templates.

Maintenance templates

Templates for marking pages in need of attention by other editors or by administrators (except for stubs, templates for which are listed below).

Template name Purpose Usage Category
Template:Delete Mark pages that should be deleted by an administrator.

{{delete}}
{{delete|reason}}

Category:Pages for deletion
Template:Wikify Request that an article be properly formatted with wiki markup, including links to other pages, section headers, etc., as appropriate. {{wikify}} Category:Articles to be wikified
Template:Work in progress Request that an article not be edited for a time because the original author is still working on it. {{Work in progress}} Category:Works in progress

Stub templates

Templates for marking short, underdeveloped articles on different topics that are in need of expansion by individuals familiar with those topics. The main category for stubs is Category:Stubs.

Template name Purpose Usage Category
Template:Apologist-stub Biographical stubs about religious (usually Christian) apologists. {{apologist-stub}} Category:Apologist stubs
Template:Argument-stub Stubs about arguments for or against the existence of God or gods. {{argument-stub}} Category:Argument stubs
Template:Atheist-stub Biographical stubs about atheists. {{atheist-stub}} Category:Atheist stubs
Template:Mythology-stub Stubs about various metaphysical, usually non-religious, topics. {{mythology-stub}} Category:Mythology stubs
Template:Philosophy-stub Stubs about various philosophical topics. {{philosophy-stub}} Category:Philosophy stubs
Template:Religion-stub Stubs about religious topics. {{religion-stub}} Category:Religion stubs
Template:Stub Stubs about all other topics. {{stub}} Category:Stubs

Navigational templates

Templates whose function is to interlink closely related articles.

(Note: Since the purpose is always the same, there is no "Purpose" column in this table. Also, since it's usually not a good idea to "auto-categorize" articles using templates such as these — i.e., by including the Category: link in the template itself — the "Category" column has been replaced by "Main article".)

Template name Usage Main article
Template:Books of the Bible {{Books of the Bible}} Bible
Template:Conversationswithanatheist {{conversationswithanatheist}} Conversations with an atheist
Template:Jackchick {{jackchick}} Jack Chick
Template:Wayofthemaster {{wayofthemaster}} The Way of the Master

External-links templates

Templates whose primary function is linking to external websites (which need not be wikis, actually).

Template name Purpose Usage Category
Template:Bible Link Bible citation to text of passage in King James Version.

{{bible|Book Chapter}}
{{bible|Book Chapter:Verse}}
{{bible|Book Chapter:Range}}
(see Template:Bible for more information)

none
Template:Wikipedia Provides prominent link (in a right-floated box) to an article in Wikipedia.

{{wikipedia}}
{{wikipedia|Article}}
{{wikipedia|Article|Link text}}
(see Template:Wikipedia for more information)

none
Template:Wiktionary Provides prominent link (in a right-floated box) to an entry in Wiktonary.

{{wiktionary}}
{{wiktionary|entry}}
{{wiktionary|entry|link text}}
(see Template:Wiktionary for more information)

none

Utility templates

Templates whose primary function is to aid in constructing other templates.

Template name Purpose Usage Category
Template:If Simple if-then-else functionality.

{{if|test=condition|then=wikitext|else=wikitext}}
(see Template:If for more information)

none

Other templates

Other templates not already listed elsewhere.

Template name Purpose Usage Category
[[Template:]] {{}} [[:Category:]]
Personal tools
Variants
Actions
wiki navigation
IronChariots.Org
Toolbox