Table of contents
  1. 1. Usage Restrictions
  2. 2. Parameters
  3. 3. Result
  4. 4. Samples
wiki.template(name: str, args : any, target: str, confict: str) : xml

Insert dynamically a wiki template with parameters.

Usage Restrictions

1.8.2 or later; 8.05.1 or later target and conflict parameters added

Parameters

Name Type Description
name str name of the template
args map (optional, default:nil) arguments for the template.
target str (optional, default: nil) alternative body target (8.05.1 or later)
conflict str (optional, one of "ignore", "replace", or "append"; default: "ignore") conflict resolution if target already exists (8.05.1 or later)

The new parameters 'target' and 'conflict' were added in 8.05.1. Using 'target' you can specify that the template should be loaded into a different target area of the skin. The 'conflict' parameter won't be necessary for most cases. It describes how the engine should handle the case where more than one result has the same 'target' value. 'Conflict' can be set to 'ignore' (default), 'replace', and 'append'.

Result

A page in xml with the specified template and number of arguments

 

Samples

  Output

To create a template:

{{wiki.template("DreamBadge") }} 

 

 

For a sample of Wiki.Template using the "target" and "conflict" parameters see:

http://forums.developer.mindtouch.com/showpost.php?p=15769&postcount=6

Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08.1a