VDR Wiki:Templates
From VDR Wiki
(→Examples) |
|||
| Line 6: | Line 6: | ||
If this is not intended prepend a ''subst:'' to the template name as in ''<nowiki>{{subst:template_name}}</nowiki>''. | If this is not intended prepend a ''subst:'' to the template name as in ''<nowiki>{{subst:template_name}}</nowiki>''. | ||
| - | ==Template | + | ==Template List== |
Here are the templates listed, that exist for VDR Wiki. | 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. <nowiki>{{subst:Article (plugin)}}</nowiki>), save the article and edit it again. The basic structure is now in place. | ||
| + | {| width="100%" class=wikitable | ||
| + | ! width="25%" | Wiki markup | ||
| + | ! width="25%" | Template | ||
| + | ! width="50%" | Description | ||
| + | |- | ||
| + | | bgcolor=#efefff | <nowiki>{{Article (plugin)}}</nowiki> | ||
| + | | [[Template:Article (plugin)]] | ||
| + | | Simple article template for plugins | ||
| + | |- | ||
| + | | bgcolor=#efefff | <nowiki>{{Article (plugin ext)}}</nowiki> | ||
| + | | [[Template:Article (plugin ext)]] | ||
| + | | More complex article template for plugins | ||
| + | |- | ||
| + | | bgcolor=#efefff | <nowiki>{{Article (patch)}}</nowiki> | ||
| + | | [[Template:Article (patch)]] | ||
| + | | Article template for patches | ||
| + | |} | ||
| - | + | ===Some Info Boxes=== | |
| - | + | They get the info text as parameter. | |
| - | + | {| width="100%" class=wikitable | |
| - | + | ! width="25%" | Wiki markup | |
| + | ! width="25%" | Template | ||
| + | ! width="50%" | Description | ||
| + | |- | ||
| + | | bgcolor=#efefff | <nowiki>{{Box Info | Text}}</nowiki> | ||
| + | | [[Template:Box Info]] | ||
| + | | This box is used for highlighting important information | ||
| + | |- | ||
| + | | bgcolor=#efefff | <nowiki>{{Box Warning | Text}}</nowiki> | ||
| + | | [[Template:Box Warning]] | ||
| + | | This box is similar to the info box above, but for more important information, e.g. about sources of danger. | ||
| + | |- | ||
| + | | bgcolor=#efefff | <nowiki>{{Box Critical | Text}}</nowiki> | ||
| + | | [[Template:Box Critical]] | ||
| + | | This box is similar to the warning box above, e.g. to advise against an unlawful act. | ||
| + | |- | ||
| + | | bgcolor=#efefff | <nowiki>{{Box File | /path/to/file | Content}}</nowiki> | ||
| + | | [[Template:Box File]] | ||
| + | | This box serves for highlighting the content of files. It should be used together with syntax highlighting. | ||
| + | |- | ||
| + | | bgcolor=#efefff | <nowiki>{{Box TOC | Heading | Column 1 | Column 2}}</nowiki> | ||
| + | | [[Template:Box TOC]] | ||
| + | | | ||
| + | |} | ||
| - | + | ===Standard Elements=== | |
| - | + | {| width="100%" class=wikitable | |
| - | + | ! width="25%" | Wiki markup | |
| - | + | ! width="25%" | Template | |
| - | + | ! width="50%" | Description | |
| - | + | |- | |
| - | + | | bgcolor=#efefff | <nowiki>{{VDRWiki Header(Standard)}}</nowiki> | |
| - | + | | [[Template:VDRWiki Header(Standard)]] | |
| - | + | | Blue VDR Wiki standard header | |
| - | + | |- | |
| - | + | | bgcolor=#efefff | <nowiki>{{VDRWiki Header(Hardware)}}</nowiki> | |
| - | + | | [[Template:VDRWiki Header(Hardware)]] | |
| - | + | | Brown standard header for hardware overviews | |
| - | + | |- | |
| - | + | | bgcolor=#efefff | <nowiki>{{VDRWiki Header(Software)}}</nowiki> | |
| - | + | | [[Template:VDRWiki Header(Software)]] | |
| - | + | | Green standard header for software overviews | |
| - | + | |- | |
| - | + | | bgcolor=#efefff | <nowiki>{{VDRWiki Footer}}</nowiki> | |
| + | | [[Template:VDRWiki Footer]] | ||
| + | | Standard navigation footer | ||
| + | |- | ||
| + | | bgcolor=#efefff | <nowiki>{{i18n|article}}</nowiki> | ||
| + | | [[Template:I18n]] | ||
| + | | Language links to the other wikis | ||
| + | |- | ||
| + | | bgcolor=#efefff | <nowiki>{{TOC}}</nowiki> | ||
| + | | [[Template:TOC]] | ||
| + | | Alphabetical TableOfContent for tables and lists (use together with ''id="A", id="B"'',...) | ||
| + | |} | ||
==Examples== | ==Examples== | ||
| Line 44: | Line 97: | ||
Place this somewhere in an article | Place this somewhere in an article | ||
<pre> | <pre> | ||
| - | {{Box | + | {{Box Info| |
| - | This is | + | This is an info. |
}} | }} | ||
</pre> | </pre> | ||
Revision as of 10:41, 22 March 2006
Contents |
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 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",...) |
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.


