VDR Wiki:Templates: Difference between revisions

From VDR Wiki
Jump to navigation Jump to search
 
(20 intermediate revisions by 4 users not shown)
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 list==
==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===
'''These are article skeletons'''. Create an empty article, place the appropiate template in it (with a prepended ''subst:'' before the template name, save the article and edit it again. The basic structure is now in place.
They get the info text as parameter.
* [[Template:Article (plugin)|<nowiki>{{Article (plugin)}}</nowiki>]]
{| width="100%" class=wikitable
* [[Template:Article (plugin ext)|<nowiki>{{Article (plugin ext)}}</nowiki>]]
! width="25%" | Wiki markup
* [[Template:Article (patch)|<nowiki>{{Article (patch)}}</nowiki>]]
! 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 Neutral | Icon=[[Image:???|right|Title]] Color=#cccccc | Title | Text}}</nowiki>
| [[Template:Box Neutral]]
| This is a neutral box <!--(Color defaults to #eeeeee)-->
|-
| 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
'''These are some info boxes'''. They get the info text as parameter.
! width="25%" | Wiki markup
* [[Template:Box Hint|<nowiki>{{Box Hint|Text}}</nowiki>]]
! width="25%" | Template
* [[Template:Box Warning|<nowiki>{{Box Warning|Text}}</nowiki>]]
! width="50%" | Description

|-

| bgcolor=#efefff | <nowiki>{{VDRWiki Header(Standard)}}</nowiki>
'''Standard elements'''
* [[Template:VDRWiki Header|<nowiki>{{VDRWiki Header}}</nowiki>]]
| [[Template:VDRWiki Header(Standard)]]
| Blue VDR Wiki standard header
* [[Template:VDRWiki Footer|<nowiki>{{VDRWiki Footer}}</nowiki>]]
|-
| 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"'',...)
|-
| bgcolor=#efefff | <nowiki>{{Button Red|Caption}}</nowiki>
| [[Template:Button Red]]
| {{Button Red|<BUTTON NAME>}}, e.g. {{Button Red|Record}}
|-
| bgcolor=#efefff | <nowiki>{{Button Green|Caption}}</nowiki>
| [[Template:Button Green]]
| {{Button Green|<BUTTON NAME>}}, e.g. {{Button Green|Audio}}
|-
| bgcolor=#efefff | <nowiki>{{Button Yellow|Caption}}</nowiki>
| [[Template:Button Yellow]]
| {{Button Yellow|<BUTTON NAME>}}, e.g. {{Button Yellow|Pause}}
|-
| bgcolor=#efefff | <nowiki>{{Button Blue|Caption}}</nowiki>
| [[Template:Button Blue]]
| {{Button Blue|<BUTTON NAME>}}, e.g. {{Button Blue|Switch}}
|-
| bgcolor=#efefff | <nowiki>{{Button Neutral|Caption}}</nowiki>
| [[Template:Button Neutral]]
| {{Button Neutral|<BUTTON NAME>}}, e.g. {{Button Neutral|1}} {{Button Neutral|OK}} ...
|}


==Examples==
==Examples==
Line 34: Line 121:
Place this somewhere in an article
Place this somewhere in an article
<pre>
<pre>
{{Box Hint|
{{Box Info|
This is a hint.
This is an info.
}}
}}
</pre>
</pre>
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.
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.

[[de:VDR Wiki:Vorlagen]]
[[es:VDR Wiki:Plantillas]]
[[fr:VDR Wiki:Modèles]]
[[ru:RuVDRWiki:Шаблоны]]
<!-- Link zum finnischen Wiki [[fi:]] -->

[[Category:Templates]]

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.