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

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)
(Use templates)
Line 23: Line 23:
  
 
''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.  
 
''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==
 +
There are a few article templates you can use during writing:
 +
 +
===Note===
 +
Include <code><nowiki>{{Note|</nowiki>''Note text''<nowiki>}}</nowiki></code> in your text to produce:
 +
 +
{{Note|Note text}}
 +
 +
===Info===
 +
Include <code><nowiki>{{Note-info|</nowiki>''Info text''<nowiki>}}</nowiki></code> in your text to produce:
 +
 +
{{Note-info|Info text}}
  
 
===Example: Infobox Song===
 
===Example: Infobox Song===

Revision as of 00:06, 7 March 2015

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.

Article templates

There are a few article templates you can use during writing:

Note

Include {{Note|Note text}} in your text to produce:

Template:Note

Info

Include {{Note-info|Info text}} in your text to produce:

Info: Info text

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
}}

Check on the page Lucienne how this infobox will look like.

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

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