VDR Wiki:Templates: Difference between revisions
(initial) |
No edit summary |
||
Line 1: | Line 1: | ||
==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. |
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. |
||
Line 5: | 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== |
|||
Here are the templates listed, that exist for VDR Wiki. |
Here are the templates listed, that exist for VDR Wiki. |
||
Line 15: | Line 17: | ||
* <nowiki>{{Box Hint|Text}}</nowiki> |
* <nowiki>{{Box Hint|Text}}</nowiki> |
||
* <nowiki>{{Box Warning|Text}}</nowiki> |
* <nowiki>{{Box Warning|Text}}</nowiki> |
||
==Examples== |
|||
Create empty article and place |
|||
<pre> |
|||
{{subst:Article (plugin)}} |
|||
</pre> |
|||
save, and edit again, the content is now in place. |
|||
Place this somewhere in an article |
|||
<pre> |
|||
{{Box Hint| |
|||
This is a hint. |
|||
}} |
|||
</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. |
Revision as of 00:33, 16 November 2004
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.
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.
- {{Article (plugin)}}
- {{Article (plugin ext)}}
- {{Article (patch)}}
These are some info boxes. They get the info text as parameter.
- {{Box Hint|Text}}
- {{Box Warning|Text}}
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 Hint| This is a hint. }}
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.