SeptemWiki:Style Guide/Templates: Difference between revisions
Line 46: | Line 46: | ||
[[Category:Style Guide]] | [[Category:Style Guide]] | ||
== Infoboxes and | == Infoboxes and Clearing Margins == | ||
{{PlazaBox | {{PlazaBox | ||
Line 59: | Line 59: | ||
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. | 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 <tt><nowiki>{{clear}}</nowiki></tt>, which is what we do right after this sentence. | |||
{{clear}} | |||
And you can see how no further content appears until after the margins are clear of the infobox. |
Revision as of 13:23, 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
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
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
The stub templates indicate that your article is in need of expansion. You can use the generic version:
{{stub}}
which yields:
![]() |
This SeptemWiki article is a stub. Help us out by expanding it. |
Or you can use more specific ones.
{{TriparicStub}}
![]() |
This article related to the Triparic language is a stub. Help us out by expanding it. |
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. 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.
![]() |
Articles to be deleted. |
![]() |
This is a small notice message. |
{{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.
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
Category:Infobox templates are for compact, standardized summaries of facts about a topic. For details on parameters, see each template.
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.