Editing Help:Templates
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | {{ | + | ''MediaWiki Help article: [https://www.mediawiki.org/wiki/Help:Templates Help:Templates]'' |
+ | ==Using Templates== | ||
+ | ===Summary=== | ||
+ | Templates are to improve wiki efficiency by allowing editors to write less on pages by transcluding these preset templates. For example, if you type <code><nowiki>{{Stub}}</nowiki></code> this shows on the page: | ||
− | {{ | + | {{rwbox|nocat=true|type=notice|text=''This is a '''[[:Category:Page Stub|Stub]]''' page. You can help {{SITENAME}} by '''[{{fullurl:{{#titleparts:{{FULLPAGENAME}}|1}}|action=edit}} expanding it]'''.}} |
− | |type= | ||
− | | | ||
− | | | ||
− | }} | ||
− | |||
− | + | In a nutshell, templates save up space and create consistency. | |
− | + | ===Parameters=== | |
− | + | Some templates take parameters. For instance, [[Template:Asof]] takes a value from A1 to the current alpha version.<br /> | |
− | + | '''Example:''' | |
− | {{ | + | <pre>{{Asof|A16}} luciferium can heal scars.</pre> |
− | < | + | '''Result:'''<br /> |
− | {{ | + | {{Asof|A16}} luciferium can heal scars. |
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | }} | ||
− | + | Templates like [[Template:Rewrite]] take special parameters. The way to use them is to type the pipe (|) symbol, followed by the parameter name, and then the value.<br /> | |
+ | '''Example:''' | ||
+ | <pre>{{Impressive | ||
+ | |title=Demo | ||
+ | }}</pre> | ||
+ | '''Result:''' | ||
+ | {{rwbox|nocat=true|type=notice|text=''This is an '''[[:Category:Impressive|Impressive]]''' page, and is giving a <span style=color:green>+3</span> positive [[thoughts#Rec Room|thought]] to all [[colonist|colonists]] viewing this page. Please consider leaving the page as is, or decorating this page with [[sculptures]]. The impressiveness of this page at the moment is <b style="color:green">{{#expr:({{#time:s}}/4+95)round 0}}</b>. It has also been deemed the title: '''Demo'''. }} | ||
− | == | + | ==Creating a template== |
− | + | ===Basics=== | |
− | |||
− | |||
− | + | ===Parameters=== | |
− | + | [[Category:Help pages]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |