Forum:Multiple templates in DPL

Hey,

I'm one of the Admins at w:c:Wakfu.

After a discussion with one of our members, I wanted to start using DPL on the site to generates some sortable tables of things. The problem is, most of the pages consist of multiple small templates, and my current level of DPL just about grasps the ability to handle one template in each article.

So, I was wondering if it was possible to select a take information from multiple templates in each article, put that information all in the same table row (so when you sort each column, the information from a single article stays together, etc)?

The member I was talking to, who came from the w:c:Dofus wiki, was basically saying we need a single giant template to cover everything that you'd want to call up with a single DPL table, but I was hoping DPL was flexible enough that the current templates/articles could be left untouched, and editting a page could be left as simple templates, rather than a giant wrapper-template generating the small ones (i.e. I don't want to trade a simplicity in editting for DPL functionality).

An example article: Ash Bow which uses:
 * The "Itembox" template which contains simple things which apply to every item in the game
 * The "EffectStub" template which contains the effect of the item when held/worn.
 * The "Attack bow" template which contains the effect of the bow's attack.
 * and the "Craftbox" template which contains the information about crafting the item.

What I have so far:
 * The Bow article, with a table of the 2 bows on the wiki, showing just the information pulled from the "Itembox" template. (lists the item's name, level, and description)
 * The "Infobox Weapon.Table" Template (there is some old info/code which I've left in the non-code part of this template so I can take ideas from it.. but it actually generates the basic table shown on the "Bow" page).
 * The "Itembox.TableRow" Template which fills the rows, with data taken from the "Itembox" on each article.

An example of what I'd like to be able to do:
 * On the general Bow page: a table showing each item's name, level, passive effects, attack effects, and if there's a craft template present (i.e. is it craftable)... without changing/adding any more templates/wrapper templates to the "Ash Bow" page.

Hopefully, I've made it clear what I'm trying to do.

Thank you for your time, and any help you can give me --Defunc7 15:11, May 4, 2011 (UTC)


 * Because you're using a surrogate template which you also use to format table rows, I don't see a way to derive data from more than on template without causing the output table to break with that dpl structure. However, you could just call various template parameters 'manually' and replace the hardcoded table tags with the  dpl parameter. That would certainly make the table more flexible. From there you would have more options on how to proceed including a new surrogate template to allow more complicated queries. On my user page, I've created an example template of how I would tackle the problem.


 * Regardless of how you proceed, the articles that you're about to include in the dpl need to be standardized to make it work. Sovq 16:06, May 4, 2011 (UTC)