NovaRoma:Templates
From NovaRoma
(Difference between revisions)
(→Date Templates: expand section on dates) |
(→Template basics: expand article a bit) |
||
Line 4: | Line 4: | ||
*Templates are added by putting the template's name in <nowiki>{{double braces}}</nowiki>. | *Templates are added by putting the template's name in <nowiki>{{double braces}}</nowiki>. | ||
*One advantage of using templates is that a change to a template will change that template on every page that uses the template. | *One advantage of using templates is that a change to a template will change that template on every page that uses the template. | ||
− | + | ||
+ | ===Templates to add standard text=== | ||
+ | |||
+ | Templates can be used to add standard text to an article. The text can be formatted and images can be included. | ||
+ | |||
+ | Example: If you type | ||
<nowiki>{{ArticleStub}}</nowiki> | <nowiki>{{ArticleStub}}</nowiki> | ||
Line 10: | Line 15: | ||
{{ArticleStub}} | {{ArticleStub}} | ||
+ | |||
+ | ===Templates to add an article to a category=== | ||
+ | |||
+ | If a template includes a category tag (example: <nowiki>[[Category:NovaRoma]]</nowiki>) then any article that contains that template will be included in the category. | ||
+ | |||
+ | ===Templates can have variables=== | ||
+ | |||
+ | Values can be passed to templates. The syntax is like this: | ||
+ | |||
+ | <nowiki>{{TemplateName | VariableName=Value}}</nowiki> | ||
==Date Templates== | ==Date Templates== |
Revision as of 02:50, 15 August 2006
Contents |
Template basics
- Templates let us put things onto pages automatically.
- Templates are added by putting the template's name in {{double braces}}.
- One advantage of using templates is that a change to a template will change that template on every page that uses the template.
Templates to add standard text
Templates can be used to add standard text to an article. The text can be formatted and images can be included.
Example: If you type
{{ArticleStub}}
then the "boilerplate" for stub articles will be included in the article, like this:
This article is a stub. Can you help by expanding it?
Templates to add an article to a category
If a template includes a category tag (example: [[Category:NovaRoma]]) then any article that contains that template will be included in the category.
Templates can have variables
Values can be passed to templates. The syntax is like this:
{{TemplateName | VariableName=Value}}
Date Templates
Templates convert recent years to Roman-style dating:
Templates convert dates in month-day format into Roman dates:
- {{Jan 1}} gives Kal. Ian. ‡.
Months use three letter abbreviations without a period: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Days are not padded with leading zeroes.