Help:Templates: Difference between revisions

From CoMakingSpace Wiki

(Created page with "Templates are easy ways to format text and other data in the same way over many pages. We have a few templates of our own that seemed good to ha...")
 
(→‎Our Templates: template data)
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
Templates may do a lot of work for you, but sometimes they do more or less than expected. Make sure you use the "Show preview" function frequently to avoid ugly surprises!
Templates may do a lot of work for you, but sometimes they do more or less than expected. Make sure you use the "Show preview" function frequently to avoid ugly surprises!


A template is insterted by typing the template name accompanied by braces, like this:
A template is inserted by typing the template name accompanied by braces, like this:
<pre>{{Template name
<pre>{{Template name
}} </pre>
}} </pre>
Line 15: Line 15:


== Our Templates ==
== Our Templates ==
Besides the high-use templates featured below, you may want to have a look at '''[[Special:AllPages/Template:|all of our templates]]'''. The purpose and use of these templates should be documented in the visible section of their respective pages ("noinclude" in code) - if you're having any problems, please don't hesitate to start a discussion and the authors or other users will gladly assist you!
Besides the high-use templates featured below, you may want to have a look at '''[[Special:AllPages/Template:|all of our templates]]'''. The purpose and use of these templates should be documented in the visible section of their respective pages ("noinclude" in code) and the "TemplateData" fields in the visual editor. If you're having any problems, please don't hesitate to start a discussion and the authors or other users will gladly assist you!


=== InfoBoxes ===
=== InfoBoxes ===
Line 22: Line 22:
=== Citation Needed ===
=== Citation Needed ===
If you find something that you think may be inaccurate but are not sure enough to delete it, use [[Template:CN]] to quickly add a {{CN}} tag!
If you find something that you think may be inaccurate but are not sure enough to delete it, use [[Template:CN]] to quickly add a {{CN}} tag!
=== Refill ===
Use [[Template:Refill]] to alert your fellow Makers and the [[management]] if something is running out!
=== Create Your Own Templates! ===
Once you're an experienced wiki user, you may want to add your own templates - please do so! Just remember to [https://github.com/comakingspace/do-something/issues/223 supply the "TemplateData"] to keep [[Martin]] happy ;-)


[[Category:Wiki]]
[[Category:Wiki]]

Latest revision as of 16:12, 15 March 2022

Templates are easy ways to format text and other data in the same way over many pages. We have a few templates of our own that seemed good to have for certain types of pages (some are just a quick way of inserting repetive text bits, some are a bit prettier). As always, there is also a very detailed MediaWiki help page available which explaines the general principles.

General Usage

Templates may do a lot of work for you, but sometimes they do more or less than expected. Make sure you use the "Show preview" function frequently to avoid ugly surprises!

A template is inserted by typing the template name accompanied by braces, like this:

{{Template name
}} 

The above example only renders a default template though - parameters are usually necessary to give it meaning. Parameters have predefined names (consult the template pages if in doubt) and are entered as following:

{{Template name
|parameter1=
|parameter2=
}}

Parameters that are entered but left empty, as in the example, may lead to the template showing a blank field. If you want the default value to be displayed, the parameter is left out entirely (like parameter3, for example).

Our Templates

Besides the high-use templates featured below, you may want to have a look at all of our templates. The purpose and use of these templates should be documented in the visible section of their respective pages ("noinclude" in code) and the "TemplateData" fields in the visual editor. If you're having any problems, please don't hesitate to start a discussion and the authors or other users will gladly assist you!

InfoBoxes

"InfoBoxes" have been defined for various page types. You probably have seen a few of them already when browsing for your favorite tools or materials!

Citation Needed

If you find something that you think may be inaccurate but are not sure enough to delete it, use Template:CN to quickly add a  [citation needed] tag!

Refill

Use Template:Refill to alert your fellow Makers and the management if something is running out!

Create Your Own Templates!

Once you're an experienced wiki user, you may want to add your own templates - please do so! Just remember to supply the "TemplateData" to keep Martin happy ;-)