zoytip extension

Jump to: navigation, search

Am digging the idea.

On a related note, varpull appears to accept parser functions and variables; is there a way to make it accept page names delivered entirely through templates?

{{#varpull: LotS/experiment/{{#if: {{{1| }}} |{{{1}}} |null}}|Experiment|firstreward}} --> yes
{{#varpull: LotS/{{{reqItem}}}|LotS Item|type}} --> yes
{{#varpull: {{LotS/RaidLink/Centurian Commander}}|raid|type}} --> no

The first two cases work, but the last one doesn't. It would simplify things if varpull could use templates to assemble the page name. I can see potential problems here because a template does not always output a page path. This may be impossible, but I thought I'd ask!

Klaxxin (talk)11:20, 9 September 2012
Edited by another user.
Last edit: 18:02, 29 July 2013
  1. varpull takes an article name and a template name as its primary arguments. The it takes a variable in that template as a 3rd argument. So it basically retrieves the first occurrence of a specific template on a page, then it parses out the variable from there. That is you won't likely get the right result if multiple of the same template are on a page.

your 3rd example won't work because {{LotS/RaidLink/Centurian Commander}} expands to something that is not an article name. And I am not sure Template:LotS/RaidLink/Centurian Commander is even a template. But if it were you'd want to call {{#varpull: Template:LotS/RaidLink/Centurian Commander|TemplateName|variable}} to get the expected result, because varpull doesnt care if the article it is pulling from is in the Template namespace.

varpull is just a fancy text parser that is designed for the "item page" scenario when you want to list a set of the variables in a table with various attributes from the item template on the "item page". granted it can be used for more than just "items", but yeah it is some random text parser function i wrote that gives us the ability to use pages with templates on them as a data source for other pages so that there only need be 1 source of truth for all data.

Zoycite (talk)11:54, 9 September 2012