Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/tangowiki/languages/LanguageConverter.php on line 694

Warning: Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /var/www/vhosts/tangowiki/includes/Hooks.php on line 201

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/vhosts/tangowiki/extensions/SemanticForms/includes/SF_Utils.php on line 262

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/vhosts/tangowiki/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_Sql3SmwIds.php on line 816

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/vhosts/tangowiki/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_Readers.php on line 399

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/vhosts/tangowiki/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_Readers.php on line 487

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/vhosts/tangowiki/extensions/SemanticMediaWiki/src/PropertyAliasFinder.php on line 74

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/vhosts/tangowiki/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_DIHandler_WikiPage.php on line 112

Warning: Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /var/www/vhosts/tangowiki/includes/Hooks.php on line 201

Warning: Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /var/www/vhosts/tangowiki/includes/Hooks.php on line 201

Warning: Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /var/www/vhosts/tangowiki/includes/Hooks.php on line 201
Difference between revisions of "Help:Use templates" - TangoWiki

Difference between revisions of "Help:Use templates"

From Tangowiki
(Example: Infobox Song)
(See also)
Line 76: Line 76:
 
*[[Semantic templates]]
 
*[[Semantic templates]]
 
*[[Create templates]]
 
*[[Create templates]]
 +
*[http://www.mediawiki.org/wiki/Help:Templates Help:Templates on mediawiki.org]

Revision as of 00:14, 17 November 2014

User manual edit TOC
Short instruction
Find and read articles
Important terms
Search for an article
User account
Registration/New user account
Preferences: User settings
Create new article
Sandbox on subpage
Cite a source & quotes
Style guide
Use forms
Create TJ page
Create milonga
Create venue
Create festival article
Add a song recording
Edit an article
Text formatting
Links
Add categories to article
Watchlist
Move (rename) a page
Images
Use templates
Message boxes
Note boxes
Guidelines
Collaborate
Discussion page
Translate a page
Get help
Expert manual

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.

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)

Use templates

All templates in TangoWiki are collected in the Category:TangoWiki templates. The article templates in there can directly be used in articles. Classic templates are always stored in the namespace "Template".

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.

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.

Example: Infobox Song

For articles about songs there is an infobox on the right side, which can be embedded with the Template:Infobox Song. For this, the embedding code is copied from the template page and added on top of the source code on the article page. The variable parameters (after the vertical lines) are filled with values.

Code:

{{ Infobox Song
| Filename =
| Caption = 
| Writer1 = 
| Writer2 = 
| Composer1 = 
| Composer2 = 
| Year of composition =
| Genre =
}}

Filled-in example (data from Lucienne):

{{ Infobox Song
| Filename = BIAGI_2209_A.jpg
| Caption = Shellac
| Writer1 = Jorge Fuentes
| Writer2 = 
| Composer1 = Domingo Rullo
| Composer2 = 
| Year of composition = 1946
| Genre = Tango
}}

This will about look like this:


Modifications to the values can be made in the source code of the article. Changes to the infobox itself have to be made in the source code of the infobox.

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".

See also