Jump to content

SeptemWiki:Style Guide/Templates

From SeptemWiki

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.

Subtypes

Main article: Help:Templates

Some templates take a lot of parameters, but most of the time, only a few of them are used. So we create a "subtype" template which provides most of the parameters for you, like Template:Stub, which just calls Template:Ambox but provides most of the parameters to produce a convenient "stub article" banner.

This process can subdivide further, and further. The Stub template itself has several subtypes, which produce different looking stubs, with different icons and text, for articles about Triparic, the Turnpike, and so forth.

Stubs

Category: Stub templates

The stub templates indicate that your article is in need of expansion. You can use the generic version:

{{stub}}

which yields:

Or you can use more specific ones.

{{TriparicStub}}

All stub templates should be found in Category:Stub templates.

Banners

Stub templates are a subtype of banners. Banners are nice boxes which run across the width of your article.

There are two main types of banners: "meta" and "content".

Meta banners

Meta banners are information about your article, rather than about your subject. They have colored tabs which indicate their "severity". They are produced using the "Article Message Box" template, fully documented at Template:Ambox.

The color of the tab (and the default icon) is determined by the type parameter, and you can make banners which are smaller and appear at the left.

{{ambox|type=delete|text=Articles to be deleted.}}


{{ambox|type=notice|small=left|text=This is a small notice message.}}


See Template:Ambox for further details.

Content banners

Content banners are more "generic". They are banners you display in your article which are about your topic itself. You can produce them with the "Color Paragraph" template, documented at Template:Colorparagraph:

{{colorparagraph
|background=#3333ff
|color=#ffcc00
|image=[[File:Ambox_content.png|20px]]
|text='''"I'll have a blue / paragraph / without you ..."'''
}}

"I'll have a blue / paragraph / without you ..."

Text Formatting

For formatting linguistic documentation, the angle bracket template is useful for producing angle brackets, which are the conventional way to display orthography: {{ab|ch}} produces "ch".

Infoboxes and Clearing Margins

Infobox for a Service Plaza

We've put this infobox here to demonstrate what they look like in general, and how to use the {{clear}} template in conjunction with them to fix any issues caused by infoboxes taking up margins. By the way, that is Sideling Hill Plaza in the picture.
Direction Eastbound and Westbound
County Fulton
State Kalmont


Infoboxes are for compact, standardized summaries of facts about a topic. For details on parameters, see each template in Category:Infobox templates.

You often want to insert an infobox template at the top of a section and allow the remaining text in the section to flow around it, which is what we did here; the template code to generate the infobox at the right was put at the top of this section, just under the header.

But the rest of your page, including additional sections, will continue to flow to the left of the infobox. If you want to force your page to "clear its margins", you simply include the template {{clear}}, which is what we do right after this sentence.

And you can see how no further content appears until after the margins are clear of the infobox. This paragraph, and the rest of the guide, are pushed down below the infobox.

Hatnotes

"Hatnote" is the Wikipedia term for those handy notes you see at the top of articles or sections, explaining disambiguations or referring you to more detailed articles.

The most commonly used one is perhaps Template:Main:

{{main|Triparic language}}
Main article: Triparic language

Also encountered are the closely-related Template:About and Template:Redirect:

{{about|the hill itself|the tunnel|Sideling Hill Tunnel||Sideling Hill (disambiguation)}}
This page is about the hill itself. For the tunnel, see Sideling Hill Tunnel. For other uses, see Sideling Hill (disambiguation).
{{redirect|Sideling Hill Plaza|other plazas|Turnpike}}
"Sideling Hill Plaza" redirects here. For other plazas, see Turnpike.

These are all subtypes of Template:Hatnote, which is used itself more directly at the top of this section:

{{hatnote|Category: [[:Category:Hatnote templates|]]}}