VassarWiki:Templates: Difference between revisions
→Notable templates: Banners |
→List of templates: Event |
||
| (One intermediate revision by the same user not shown) | |||
| Line 26: | Line 26: | ||
# Example usage: In an "Examples" section, provide both example syntax (between <nowiki><pre> </pre></nowiki>) and an example template displayed (the same syntax but without <nowiki><pre> </pre></nowiki>). | # Example usage: In an "Examples" section, provide both example syntax (between <nowiki><pre> </pre></nowiki>) and an example template displayed (the same syntax but without <nowiki><pre> </pre></nowiki>). | ||
== | == List of templates == | ||
*[[Template:Event|Event]], to be placed on any page for events (will autopopulate on [[Upcoming Events]]) | |||
* [[Template:Transclude|Transclude]], to copy part of one page on another page (will update when | |||
* [[Template:See also|See also]] & [[Template:Main article|Main article]]: Italicized notes at the top of pages or sections, to display important links | |||
* [[Template:Consensus]], to be placed on VassarWiki pages to clarify level of consensus | [[:Category:Infoboxes|Infoboxes]] (using the metatemplate [[Template:Infobox|Infobox]]) can be placed on pages to easily display basic data/information about a subject. Notable infoboxes include: | ||
* [[Template:Construction]], to be placed on pages under construction (recognizing that VassarWiki is a continual work in progress) | |||
* [[Template:Infobox group|Infobox group]], for student groups | |||
* [[Template:Infobox house|Infobox house]], for campus housing | |||
[[:Category:Userboxes|Userboxes]] (using the metatemplate [[Template:Userbox|Userbox]]) are a way to easily communicate about yourself on your [[VassarWiki:User pages|user page]]. | |||
Banners (using the metatemplate [[Template:Banner|Banner]]) can be placed at the very top of pages to notify readers of especially pertinent information. | |||
* [[Template:Consensus|Consensus]], to be placed on VassarWiki pages to clarify level of consensus | |||
* [[Template:Construction|Construction]], to be placed on pages under construction (recognizing that VassarWiki is a continual work in progress) | |||
== See also == | == See also == | ||
Latest revision as of 21:26, 17 May 2026
Templates are pages designed for inclusion in other pages. For a list of templates, go to Special:AllPages and change the Namespace to "Template".
Using a template
To use a template in the Visual Editor, click "Insert" then "Template", or type two left curly brackets ({{). From here, you can search for the template you need, and save commonly used templates.
In the Source Editor, you will have to type the syntax manually:
{{Name
|parameter1 = value1
|parameter2 = value2
}}
Take a look at the desired template's documentation, where there may be example syntax that you can adapt.
If you insert a template with the prefix "subst:" before it (e.g. {{subst:Name}}), it will substitute the template code into the page and it will longer be editable as a template. You generally shouldn't do this unless specified on the template documentation.
Making a template
Anyone can make a template! Just create a page with the prefix "Template:" and insert the text and/or code you wish to be transferred to another page. Templates can be newly written or, to save duplicating work already done, exported from another wiki like Wikipedia, and then imported here.
Documentation
To make it easy for contributors to use your template, all templates should have documentation.
Without any line breaks or spaces, write "<noinclude>{{Documentation}}</noinclude>" at the end of your template―this will transclude the information from your template's documentation page (located at "Template:Example/doc") onto the Template page, but not when using your template on another page. You should also include any categories that apply to the Template
Template documentation should have at least two parts:
- Template data: a short description of the template and information about the template's variables. Provide template data by clicking the "Edit template data" button when editing the documentation page.
- Example usage: In an "Examples" section, provide both example syntax (between <pre> </pre>) and an example template displayed (the same syntax but without <pre> </pre>).
List of templates
- Event, to be placed on any page for events (will autopopulate on Upcoming Events)
- Transclude, to copy part of one page on another page (will update when
- See also & Main article: Italicized notes at the top of pages or sections, to display important links
Infoboxes (using the metatemplate Infobox) can be placed on pages to easily display basic data/information about a subject. Notable infoboxes include:
- Infobox group, for student groups
- Infobox house, for campus housing
Userboxes (using the metatemplate Userbox) are a way to easily communicate about yourself on your user page.
Banners (using the metatemplate Banner) can be placed at the very top of pages to notify readers of especially pertinent information.
- Consensus, to be placed on VassarWiki pages to clarify level of consensus
- Construction, to be placed on pages under construction (recognizing that VassarWiki is a continual work in progress)