Topic on Help talk:Extension:TemplateWizard

TW do not follow parameters order in TemplateData

7
Mannivu (talkcontribs)

I've noticed that TW do not follow parameters order set in TemplateData. I've made an example in it:Special:PermaLink/102712468: as you can see, the template added with VE follows the parameter order set in it:Template:RIAA/TemplateData (1→opera→accesso), but the one added using TW follows the order the parameters have been added to the TemplateData (1→accesso→opera). This template has only 4 parameters, so it can be solved quite easily editing the TemplateData like this, but for more "heavy" templates this can generate a wrong wikicode.

NKohli (WMF) (talkcontribs)

@Fringio TW tries to separate required, suggested and optional parameters. Ideally, that is the order in which they should be added to TemplateData. Is that causing the issue you mention?

Mannivu (talkcontribs)

I understand that, and I find very useful that the template list them in the order Required→Suggested→Optional, but I also think that it should follow the instructions about parameter order, since most of templates structure (i.e. the wikicode required for the template) do not follow the Required→Suggested→Optional order, but the order set by TemplateData.

NKohli (WMF) (talkcontribs)

When you say "instructions about parameter order", do you mean the order that's specified in TemplateData?

Mannivu (talkcontribs)

Exactly.

PerfektesChaos (talkcontribs)

There might be reasons of logical structure that the TD order is grouping items of same topic. Imagine the description of a person:

  1. Family name (required)
  2. Given name (required)
  3. Middle name (optional)
  4. Father name, patronyme (optional)
  5. Suffix, jr., sr. (optional)
  6. Pseudonym, artist name, clerical name (optional)
  7. Name at birth or when married (optional)
  8. Date of birth (required)
  9. Place of birth (suggested)
  10. Date of death (suggested)
  11. Place of death (suggested)
  12. Business (required)

If you are sorting this by required→suggested→optional the outcome is quite confusing.

Mannivu (talkcontribs)

The point of the TemplateData is to give the software the ability to insert the template wikicode in a fixed order, so I don't understand why TW shouldn't use this order. I'm not saying TW have to follow required→suggested→optional order, but use the order set in the TemplateData.

Reply to "TW do not follow parameters order in TemplateData"