Difference between revisions of "Help:Use templates"
(→Article templates) |
(→Parameters & values) |
||
(12 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
==Templates== | ==Templates== | ||
For TangoWiki exist multiple templates, which can be embedded in articles and other pages. Templates allow the input of text with its display already being determined by the template behind it. Templates are especially useful for infoboxes, tables and other content with factual character. | For TangoWiki exist multiple templates, which can be embedded in articles and other pages. Templates allow the input of text with its display already being determined by the template behind it. Templates are especially useful for infoboxes, tables and other content with factual character. | ||
+ | |||
+ | Templates are also the basis for [[:Category:TangoWiki forms]] (see help on [[Help:Use forms|how to use forms]]), the templates structure the output of the data input in the form. | ||
Embedding of templates has many advantages: | Embedding of templates has many advantages: | ||
Line 8: | Line 10: | ||
*simplification of creating new pages (less Wiki syntax, less code) | *simplification of creating new pages (less Wiki syntax, less code) | ||
*simpler adaption of more than one page at the same time, respectively, their display | *simpler adaption of more than one page at the same time, respectively, their display | ||
− | *simple storage of information for | + | *simple storage of information for semantic browsing, creation of semantic templates (no change for embedding) |
+ | |||
+ | ==Useful templates in TangoWiki== | ||
+ | All templates in TangoWiki are stored in the [[Help:Important terms#Namespace|namespace]] "Template:" and are collected in the [[:Category:TangoWiki templates|category "TangoWiki templates"]]. There are main categories to be found: | ||
+ | *[[:Category:Article template|Article template]]: Article templates can directly be used in articles. They include '''Noteboxes''' and other useful templates for good content creation. | ||
+ | *[[:Category:Help template|Help template]]: Templates only used for the help area, the [[Help:Namespaces|namespace]] "Help:" and its contents there. | ||
+ | *[[:Category:Messagebox template|Messagebox template]]: Messagebox templates should mainly be used by admins. They are meant for a page-wide basis and shall be included on top of the page. They consider deletion, moving and other general content information concerning the page. | ||
+ | *[[:Category:Technical template|Technical template]]: Technical templates are useful helper templates for making the wiki work. They need not to be used in article content, but are rather subtemplates for other templates, forms etc. | ||
+ | |||
+ | {{Note-info|title=Distinction:|'''What is the difference between "Message boxes" and "Note boxes"?''' Note boxes can be used within the content text of an article and highlight info, warnings and other useful hints. Message boxes are meant for a meta-basis, page-wise. They concern deletion, moving and general content information and are usually to be found on top of pages. Message boxes usually "do" something extra with a page, i.e. sort them into a maintenance category, while note boxes only inform ''on'' the page. – Note boxes on the other hand, can be used in any article, wherever they fit. They are all stored in the [[:Category:Article template|category "Article template"]]. (This info is written in a note box, for example.)}} | ||
==Use templates== | ==Use templates== | ||
− | + | On the respective template page there is the code for embedding documented. This code can be copied and embedded into articles. Then the particular parameters are filled with right information. After saving the page the template will be shown pre-formatted on the page. | |
− | + | ||
− | On the respective template page there is the code for embedding documented. This code can be copied and embedded into articles. Then the particular parameters are filled with right information. After saving the page the template will be shown pre-formatted on the page | + | |
Generally, templates are embedded with the code '''<code><nowiki>{{Template name}}</nowiki></code>''' (template name within 2 curly brackets each). In more complex templates with variable parameters, the curly brackets still remain at the beginning and end of the code. | Generally, templates are embedded with the code '''<code><nowiki>{{Template name}}</nowiki></code>''' (template name within 2 curly brackets each). In more complex templates with variable parameters, the curly brackets still remain at the beginning and end of the code. | ||
Line 22: | Line 31: | ||
Some parameters are mandatory, which means, that the field will show even with empty values. Some parameters are optional, so the field can stay empty and the empty field won't show. | Some parameters are mandatory, which means, that the field will show even with empty values. Some parameters are optional, so the field can stay empty and the empty field won't show. | ||
− | + | {{Note|title=Tip:|It is recommended to embed the entire code into the page, even if some parameters cannot be filled in right away. This makes it easier for other users to detect and complete missing values.}} | |
==Article templates== | ==Article templates== | ||
There are a few article templates you can use during writing. They are usually in the syntax <code><nowiki>{{</nowiki>''Templatename''<nowiki>|</nowiki>''Parameter value''<nowiki>}}</nowiki></code>. Use the template of your choice ("template name") and change the "parameter value" for your desired text. | There are a few article templates you can use during writing. They are usually in the syntax <code><nowiki>{{</nowiki>''Templatename''<nowiki>|</nowiki>''Parameter value''<nowiki>}}</nowiki></code>. Use the template of your choice ("template name") and change the "parameter value" for your desired text. | ||
− | + | See more: | |
− | + | *[[Help:Note boxes|Note boxes]] | |
− | + | *[[Help:Message boxes|Message boxes]] | |
− | + | *[[Help:Guidelines|Guidelines]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | | | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Help== | ==Help== | ||
Line 77: | Line 45: | ||
==See also== | ==See also== | ||
− | |||
− | |||
*[http://www.mediawiki.org/wiki/Help:Templates Help:Templates on mediawiki.org] | *[http://www.mediawiki.org/wiki/Help:Templates Help:Templates on mediawiki.org] |
Latest revision as of 16:45, 23 August 2015
Contents
Templates
For TangoWiki exist multiple templates, which can be embedded in articles and other pages. Templates allow the input of text with its display already being determined by the template behind it. Templates are especially useful for infoboxes, tables and other content with factual character.
Templates are also the basis for Category:TangoWiki forms (see help on how to use forms), the templates structure the output of the data input in the form.
Embedding of templates has many advantages:
- uniformly display of information on comparable pages
- simplification of creating new pages (less Wiki syntax, less code)
- simpler adaption of more than one page at the same time, respectively, their display
- simple storage of information for semantic browsing, creation of semantic templates (no change for embedding)
Useful templates in TangoWiki
All templates in TangoWiki are stored in the namespace "Template:" and are collected in the category "TangoWiki templates". There are main categories to be found:
- Article template: Article templates can directly be used in articles. They include Noteboxes and other useful templates for good content creation.
- Help template: Templates only used for the help area, the namespace "Help:" and its contents there.
- Messagebox template: Messagebox templates should mainly be used by admins. They are meant for a page-wide basis and shall be included on top of the page. They consider deletion, moving and other general content information concerning the page.
- Technical template: Technical templates are useful helper templates for making the wiki work. They need not to be used in article content, but are rather subtemplates for other templates, forms etc.
Use templates
On the respective template page there is the code for embedding documented. This code can be copied and embedded into articles. Then the particular parameters are filled with right information. After saving the page the template will be shown pre-formatted on the page.
Generally, templates are embedded with the code {{Template name}}
(template name within 2 curly brackets each). In more complex templates with variable parameters, the curly brackets still remain at the beginning and end of the code.
Parameters & values
In some templates there are defined parameters with variable values to be filled. These parameters should be shortly described on the template page, to simplify filling-in.
Some parameters are mandatory, which means, that the field will show even with empty values. Some parameters are optional, so the field can stay empty and the empty field won't show.
Article templates
There are a few article templates you can use during writing. They are usually in the syntax {{Templatename|Parameter value}}
. Use the template of your choice ("template name") and change the "parameter value" for your desired text.
See more:
Help
For questions about using templates contact the creator or editor of the template page or of an article, in which the template has already been used. On which pages a template is used, you can view on the template page in the left sidebar under "Toolbox" > "What links here".