Go Back   Play by Post > Network > Aelyria > Plane of Knowledge > Lore > Arcana


Comment
 
LinkBack Article Tools Rate Article Display Modes
Wiki Templates
Published by Kaelon
January 11, 2008
Scroll Wiki Templates

A Wiki Template is a wiki article that can be inserted in other articles. You can use templates to define common content that will be included in multiple articles (for instance, a disclaimer, instructions, or guidelines), and then when you want to include that content in an article, you simply reference that template. This is done using the template bbcode. The standard syntax for this is:

[template]Template Name[/template]

Wiki Templates support named and numbered variables; by default, these are auto-numbered in the following syntax:

[template]Template Name|var1|var2|var3[/template]

In the above example, var1, var2, and var3 are the values of numbered variables 1, 2, and 3, respectively. Using named parameters is only slightly different:

[template]Template Name|name1=value1|name2=value2|name3=value3[/template]

In the body of the template, a Wiki article by the same name which we request that you place in the Templates wiki forum, you can use arguments passed in with the following syntax:

{{{variable|default}}}

Variable is the name of the argument or variable (or its number if using numbered parameters). Default is totally optional, and specifies the value of that parameter if a template were to be called without the corresponding variables defined.

Templates in Practice

Let us say that you created a Template titled Tip, and the content of this template wiki article is:

[b]Did you know?[/b] - {{{1}}}

Notice above that the template calls for the first numbered variable, 1, which refers to the first parameter passed when calling the template. Then, when you wish to use the template in a wiki article, the following syntax can be used:

[template]Tip|Some tip text here.[/template]

In this example, we used numbered arguments, variables for which no name is specified. If you have many arguments, it may be more beneficial to name them as discussed previously and calling them by their names, giving them default values when it is sensible to do so.

For more information about Wiki bbcodes, please see the Wiki Help article.
Article Tools

Featured Articles
Read more
A Primer to Combat

Second Edition, Revised
Comment

Article Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 02:54 AM.


 
 

Terms of Use :: Feedback :: Be a Mod

Play by Post ™ Version 3.0.6
Copyright © 1989-2008 Play by Post LLC. All Rights Reserved.
Aelyria ® is a Registered Trademark of Play by Post LLC.