A large portion of relevant modules/templates have now been switched to cargo. Various usages of SMW throughout the wiki need to be replaced by the new functions, in particular item tables. If some pages do not show up but contain no errors, please null-edit them. To see how you can help with the port check out Path_of_Exile_Wiki:To-do_list/SMW_migration (and leave a comment on the talk page if you have questions).

Template:SMW generic link

From Path of Exile Wiki
Jump to: navigation, search
[view] [edit] [history] [purge] Documentation icon Template documentation

Overview

This template is intended to show a generic link for a multiple values from a single result row.

Usage

In queries specify the following:

 |?<property>=
 |format=template
 |template=SMW generic link
 |link=none
 |limit=1
 |searchlabel=

<property> should be a property of the page(s) you're querying which will be used as the name for the link.

Any additional properties can be specified and they'll be shown behind the link (the behavior can be customized with parameters). Any line breaks (<br>) in the text of additional properties will be removed.

Note limit and searchlabel are technically optional, but should be specified so the template displays correctly.

Extra Parameters

The parameters for this template must be supplied in the userparam parameter of the ask query.

There are two strict rules:

  • Format: argument=value
  • Separation: ,  (comma AND backspace)
Parameter Description Default
intro append this string in front of any extra arguments (
outro append this string at the end of any extra arguments )
sep use the specified separator to connect any extra arguments into a list ,
color[N] Use the specified color ({{C}}) for the Nth additional parameter.

If N is omitted it is applied to the link.

template[N] Uses the specified template for the Nth additional parameter.

If N is omitted it is applied to the link. The template will be called with a parameter called text containing the contents. In case of the link, the template will be called with an additional parameter page which will contain the page name.

template[N]_args Passes the specified named arguments to the specified template for the Nth additional parameter.

If N is omitted it is applied to the link. The arguments must be in the format of:

 arg1=value1; arg2=value2; arg3=value3 

Example

{{#ask: 
 [[Is mod::+]]
 [[Has name::+]]
 |?Has name=
 |?Has mod domain
 |?Has mod generation type 
 |format=template 
 |template=SMW generic link
 |userparam=sep=;, color1=mod, intro={, outro=}
 |link=none
 |limit=1
 |searchlabel=
}}

Yields:

{{#ask:

Is mod::+
Has name::+
|?Has name=
|?Has mod domain
|?Has mod generation type 
|format=template 
|template=SMW generic link
|userparam=sep=;, color1=mod, intro={, outro=}
|link=none
|limit=1
|searchlabel=

}}

The above documentation is transcluded from Template:SMW generic link/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Please add categories and interwikis to the /doc subpage. Subpages of this template.