VDR Wiki:Templates: Difference between revisions

From VDR Wiki
Jump to navigation Jump to search
No edit summary
 
Line 130: Line 130:
[[es:VDR Wiki:Plantillas]]
[[es:VDR Wiki:Plantillas]]
[[fr:VDR Wiki:Modèles]]
[[fr:VDR Wiki:Modèles]]
[[ru:RuVDRWiki:Шаблоны]]
<!-- Link zum russischen Wiki [[ru:]] -->
<!-- Link zum finnischen Wiki [[fi:]] -->
<!-- Link zum finnischen Wiki [[fi:]] -->



Latest revision as of 21:37, 15 August 2006

Description

Templates are ready to use constructs of wiki syntax. They are useful for frequently used text or other unchanging things that are used more often.

One can use a template by inserting {{template_name|option1|option2}} in the text. It is then replace by the template content together with the option in the generated text. That means, changing a template changes the text in all articles the template is used in.

If this is not intended prepend a subst: to the template name as in {{subst:template_name}}.

Template List

Here are the templates listed, that exist for VDR Wiki.

Article Skeletons

Create an empty article, place the appropiate template in it (with a prepended subst: before the template name, e.g. {{subst:Article (plugin)}}), save the article and edit it again. The basic structure is now in place.

Wiki markup Template Description
{{Article (plugin)}} Template:Article (plugin) Simple article template for plugins
{{Article (plugin ext)}} Template:Article (plugin ext) More complex article template for plugins
{{Article (patch)}} Template:Article (patch) Article template for patches

Some Info Boxes

They get the info text as parameter.

Wiki markup Template Description
{{Box Info | Text}} Template:Box Info This box is used for highlighting important information
{{Box Warning | Text}} Template:Box Warning This box is similar to the info box above, but for more important information, e.g. about sources of danger.
{{Box Critical | Text}} Template:Box Critical This box is similar to the warning box above, e.g. to advise against an unlawful act.
{{Box Neutral | Icon=[[Image:???|right|Title]] Color=#cccccc | Title | Text}} Template:Box Neutral This is a neutral box
{{Box File | /path/to/file | Content}} Template:Box File This box serves for highlighting the content of files. It should be used together with syntax highlighting.
{{Box TOC | Heading | Column 1 | Column 2}} Template:Box TOC

Standard Elements

Wiki markup Template Description
{{VDRWiki Header(Standard)}} Template:VDRWiki Header(Standard) Blue VDR Wiki standard header
{{VDRWiki Header(Hardware)}} Template:VDRWiki Header(Hardware) Brown standard header for hardware overviews
{{VDRWiki Header(Software)}} Template:VDRWiki Header(Software) Green standard header for software overviews
{{VDRWiki Footer}} Template:VDRWiki Footer Standard navigation footer
{{i18n|Article}} Template:I18n Language links to the other wikis
{{TOC}} Template:TOC Alphabetical TableOfContent for tables and lists (use together with id="A", id="B",...)
{{Button Red|Caption}} Template:Button Red
<BUTTON NAME>
, e.g.
Record
{{Button Green|Caption}} Template:Button Green
<BUTTON NAME>
, e.g.
Audio
{{Button Yellow|Caption}} Template:Button Yellow
<BUTTON NAME>
, e.g.
Pause
{{Button Blue|Caption}} Template:Button Blue
<BUTTON NAME>
, e.g.
Switch
{{Button Neutral|Caption}} Template:Button Neutral
<BUTTON NAME>
, e.g.
1
OK
...

Examples

Create empty article and place

{{subst:Article (plugin)}}

save, and edit again, the content is now in place.

Place this somewhere in an article

{{Box Info|
This is an info.
}}

and save it. The resulting page show noch a Box with the text This is a hint in it. Edit it again. Again the call of the template is there, not the content.