Help:Templates
Templates are pages which can be included inside other pages by using the {{ }}
syntax.
How the syntax works
At a basic level, if you put {{Namespace:Page}}
into your page, then at that point, the contents of the page Namespace:Page
will be included, regardless of the page.
For pages that are generally intended to be used as templates, if you put them in the Template:
namespace, then you don't need to specify the namespace when using the curly braces, because that's what it assumes by default.
A template can be as simple as you like; if I create a page called Template:Jerkface
and it just contains "Shawn Knight", then every place we put {{Jerkface}}
in the wiki, "Shawn Knight" will appear. But then simply by editing Template:Jerkface
to say "Alan Caum", every page which uses the template will show Alan's name instead.
Templates with Parameters
At a more advanced level, a template can have parameters, separated inside the curly braces by vertical bars. And generally a parameter has a name and a value.
Here's an example of an info box for a service plaza, using the PlazaBox
template, with a number of parameters.
![]() The plaza entrance | |
Direction | Eastbound and Westbound |
---|---|
County | Fulton |
State | Kalmont |
Editing Templates
Not everyone with permission to edit an article has permission to edit templates, because you have the potential to break a lot of pages if you screw one up. If you need a template for something, either ask Shawn to do it or show him that you're really comfortable with the syntax.
All Template Pages
- !
- !/doc
- =
- =/doc
- Ab
- Ab/doc
- About
- About/doc
- Ambox
- Ambox/doc
- C
- C/doc
- Clear
- Clear/doc
- Colorparagraph
- Colorparagraph/doc
- DayTunnelsLost
- DayTunnelsLost/doc
- Dec2hex
- Dec2hex/doc
- Disamb
- Disamb/doc
- Documentation
- Documentation/doc
- Expand
- Expand/doc
- FlagAndArms
- FlagAndArms/doc
- GrønbjergStub
- GrønbjergStub/doc
- Hatnote
- Hatnote/doc
- Hex2dec
- Hex2dec/doc
- Hidden category
- Hidden category/doc
- Infobox
- Infobox/doc
- Infobox/row
- LandBox
- LandBox/doc
- Lands
- Lands/doc
- Main
- Main/doc
- Main other
- Main other/doc
- Metatemplate
- Metatemplate/doc
- Namespace detect
- Namespace detect/doc
- Navbar
- Navbox
- Para
- Para/doc
- PlazaBox
- PlazaBox/doc
- Redirect
- Redirect/doc
- Replace
- Replace/doc
- Str rep
- Str rep/doc
- Stub
- Stub/doc
- Substcheck
- Substcheck/doc
- Template other
- TripariaStub
- TripariaStub/doc
- TriparicStub
- TriparicStub/doc
- Triparic dictionary row
- TunnelBox
- TunnelBox/doc
- Turnpike
- Turnpike/doc
- TurnpikeOpen
- TurnpikeOpen/doc
- TurnpikeStub
- TurnpikeStub/doc
- Tx
- Tx/doc
- Txi
- Txi/doc