VassarWiki:Templates: Difference between revisions

 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Templates''' are pages designed for inclusion in other pages.  
'''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 ==
== Using a template ==
Line 6: Line 6:
In the Source Editor, you will have to type the syntax manually:
In the Source Editor, you will have to type the syntax manually:
  <nowiki>{{Name
  <nowiki>{{Name
|parameter1 = value1
  |parameter1 = value1
|parameter2 = value2
  |parameter2 = value2
  }}</nowiki>  
  }}</nowiki>  
Take a look at the desired template's documentation, where there may be example syntax that you can adapt.  
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. <code><nowiki>{{subst:Name}}</nowiki></code>), it will substitute the template code into the page and it will longer be editable as a template. You shouldn't do this unless specified on the template documentation.
If you insert a template with the prefix "subst:" before it (e.g. <code><nowiki>{{subst:Name}}</nowiki></code>), 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 ==
== Making a template ==
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>).  


== Notable templates ==
== List of templates ==
* [[Template:Infobox]]: Meta-template used to make [[:Category:Infoboxes|infobox templates]]. Infoboxes can be placed on pages to easily display basic data/information about a subject.
 
* [[Template:Userbox]]: Meta-template used to make [[:Category:Userboxes|userbox templates]]. Userboxes are a way to easily communicate about yourself on your [[VassarWiki:User pages|user page]].
*[[Template:Event|Event]], to be placed on any page for events (will autopopulate on [[Upcoming Events]])
* [[Template:See also]] & [[Template:Main article]]: Notes at the top of pages or sections to display important links
* [[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
 
[[: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: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 ==


* [https://vassar.wiki/wiki/Special:AllPages?from=&to=&namespace=10&hideredirects=1 All template pages]
* [[mediawikiwiki:Help:Templates|MediaWiki's help page on templates]]
* [[mediawikiwiki:Help:Templates|MediaWiki's help page on templates]]


[[Category:Page types]]
[[Category:Page types]]