WildStar Wiki
Advertisement

This template is used in semantic queries in templates, mostly infobox templates, to get imported data from data pages into content pages. Specifically, it first assigns the name to the data page returned by the query to the data_page variable. It then transcludes the data page itself, and properly set up data pages assign their data to appropriate variables.

It isn't intended to be used directly, but through a #ask query designed to find the appropriate data page. An example of this is below:

{{#ask: {{#if: {{{datapage|}}}
    |[[{{{datapage|}}}]]
    |[[Has name::{{#if:{{{name|}}}|{{{name}}}|{{#titleparts:{{PAGENAME}} }} }}]]
  }} [[Category:Imported quest data]]
  |format=template
  |template=Get data page
  |link=none
  |limit=1
}}

If the template containing this code receives a value for the datapage parameter, it will find the data page with that exact name if it exists and is in Category:Imported quest data. Otherwise, if the name parameter, it will look for a data page in Category:Imported quest data with that name value in Property:Has name. Obviously, the code above is intended for quest data, but by merely changing the category, it can be quickly adapted for other types of data.

Advertisement