Jump to content

SeptemWiki:Style Guide/Templates: Difference between revisions

From SeptemWiki
Created page with "The judicious use of '''templates''' will make it easier for SeptemWiki editors to write clear, consistent articles. This guide contains information on templates which editor..."
 
No edit summary
Line 1: Line 1:
The judicious use of '''templates''' will make it easier for SeptemWiki editors to write clear, consistent articles.  This guide contains information on templates which editors should know about and use appropriately.
The judicious use of '''templates''' will make it easier for SeptemWiki editors to write clear, consistent articles.  This guide contains information on templates which editors should know about and use appropriately.


== Template Syntax ==
== Syntax ==


A template is inserted into a page using the syntax:  
{{main|Help:Templates}}


  <nowiki>{{TemplateName|param1=A|param2=B|param3=C|...}}</nowiki>
Templates are embedded in your article using the template syntax described in the [[Help:Templates]] page. For each template described in this page, examples are given.


where <tt>TemplateName</tt> is the name of the template, and <tt>param1</tt> is the name of a parameter given the value <tt>A</tt>, <tt>param2</tt> is a parameter given the value <tt>B</tt>, and so on. 
== Banners ==


For some simple templates, only parameter values are specified, not their names; if there are multiple parameters in such a case, they must be given in orderAn example is the "main article" template, which takes only one parameter:
Banners are nice boxes which run across the width of your articleSome common ones are the [[Template:Stub|Stub template]]:
 
<nowiki>{{main|Triparic language}}</nowiki>
 
And some templates may be so simple they need no parameters at all:


  <nowiki>{{stub}}</nowiki>
  <nowiki>{{stub}}</nowiki>


In the event you wish to make your wiki code more readable, you may insert line breaks between the parameters of a template.  So the example at the top of this section could be written:
which yields:


<nowiki>{{TemplateName
{{stub|nocategory=yes}}
|param1=A
|param2=B
|param3=C
|...}}</nowiki>
 
== Banners ==


Banners are




[[Category:Style Guide]]
[[Category:Style Guide]]

Revision as of 12:18, 9 April 2016

The judicious use of templates will make it easier for SeptemWiki editors to write clear, consistent articles. This guide contains information on templates which editors should know about and use appropriately.

Syntax

Main article: Help:Templates

Templates are embedded in your article using the template syntax described in the Help:Templates page. For each template described in this page, examples are given.

Banners

Banners are nice boxes which run across the width of your article. Some common ones are the Stub template:

{{stub}}

which yields: