14,315
edits
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This page is supposed to explain to editors what templates are, how to use them and how to edit them.<br> | This page is supposed to explain to editors what templates are, how to use them and how to edit them.<br> | ||
Not all templates will be explained here, but you should get a general idea about how they work and then be able to use the others as well. You can find all templates in [[:Category:Templates]] and sub-categories. | Not all templates will be explained here, but you should get a general idea about how they work and then be able to use the others as well. You can find all templates in [[:Category:Templates]] and sub-categories. | ||
Line 39: | Line 38: | ||
Here's a list of some templates and how to use them. | Here's a list of some templates and how to use them. | ||
=== | ===Basic templates=== | ||
See [[:Category:Basic templates]] | See [[:Category:Basic templates]] | ||
Line 48: | Line 47: | ||
====Internal links==== | ====Internal links==== | ||
For internal links, instead of e.g. {{ic|<nowiki>[[Main Page]]</nowiki>}} to link to the [[Main Page]] we use {{ic|<nowiki>{{Internal | For internal links, instead of e.g. {{ic|<nowiki>[[Main Page]]</nowiki>}} to link to the [[Main Page]] we use {{ic|<nowiki>{{Internal link |target=Main Page |link-name=Main Page}}</nowiki>}}. | ||
====Categories==== | ====Categories==== | ||
Instead of {{ic|<nowiki>[[Category:Category name]]</nowiki>}} to add a category to a page we use {{ic|<nowiki>{{category |category=Category name}}</nowiki>}}. | Instead of {{ic|<nowiki>[[Category:Category name]]</nowiki>}} to add a category to a page we use {{ic|<nowiki>{{category |category=Category name}}</nowiki>}}. | ||
====Code==== | |||
To put some code inside a grey box like {{Ic|example code}} just write <nowiki>{{Ic|example code}}</nowiki>. | |||
====Warning small==== | |||
To make a {{Warning small|harsh warning}} just write {{Ic|<nowiki>{{Warning small|harsh warning}}</nowiki>}}. In this case {{Ic|harsh warning}} is a custom text, by default {{Ic|<nowiki>{{Warning small}}</nowiki>}} just puts out {{Warning small}}. | |||
====Navbar==== | |||
Many pages display a navbar on the bottom, but not in mobile view. To add this to the page just put {{Ic|<nowiki>{{Navbar}}</nowiki>}} on the bottom of the page. If it's a page about a software project, e.g. Mastodon, then use e.g. {{Ic|<nowiki>{{Navbar/Mastodon}}</nowiki>}} instead. | |||
====Language switch==== | |||
This one is rarely needed for basic editing. It simply puts a slash followed by the language code in the text. So e.g. /en, /de, /ja, /he, ...<br> | |||
To use it simply put {{Ic|<nowiki>{{Language switch}}</nowiki>}} in the code. | |||
===Content templates=== | |||
See [[:Category:Content templates]].<br> | |||
These are templates that are simply used to put something in many articles without having to edit each article every time the content updates. | |||
They are: | |||
* [[Template:Comparison of Mastodon forks]] | |||
* [[Template:Comparison of microblogging services]] | |||
* [[Template:Getting started links]] | |||
===Infobox templates=== | ===Infobox templates=== | ||
Line 72: | Line 98: | ||
|Same. | |Same. | ||
|- | |- | ||
|{{ic|<nowiki>{{Infobox | |{{ic|<nowiki>{{Infobox app}}</nowiki>}} | ||
|Use in [[:Category:Apps]] articles. | |Use in [[:Category:Apps]] articles. | ||
|Same as above: On the very top of the article except articles with translate tags. | |Same as above: On the very top of the article except articles with translate tags. | ||
|- | |- | ||
|{{ic|<nowiki>{{Infobox | |{{ic|<nowiki>{{Infobox app short}}</nowiki>}} | ||
|Same, if there are no media files for the app uploaded yet. | |Same, if there are no media files for the app uploaded yet. | ||
|Same. | |Same. | ||
Line 92: | Line 118: | ||
|Same. | |Same. | ||
|- | |- | ||
|{{ic|<nowiki>{{Infobox | |{{ic|<nowiki>{{Infobox platform}}</nowiki>}} | ||
|Use on a Fediverse project's advanced page. | |Use on a Fediverse project's advanced page. | ||
|This template is more complicated, use only if you are an experienced template editor | |This template is more complicated, use only if you are an experienced template editor | ||
Line 210: | Line 236: | ||
==What you should consider for translations== | ==What you should consider for translations== | ||
{{Draft section}} | |||
==How to create your own templates== | ==How to create your own templates== | ||
{{Draft section}} | |||
{{category |category=Editing guides}} | {{category |category=Editing guides}} |