Topic on Extension talk:TemplateData

"Params" but "Param object"

9
W like wiki (talkcontribs)
Thiemo Kreuz (WMDE) (talkcontribs)

I agree it's not very easy to understand, but I'm not sure what you are missing. "sets": [] is an array of set objects. A single set object is described below.

Same for "params": {}, except it's not an array but an object that maps parameter names to param objects.

"maps": {} is documented a little different, as a single thing. The descriptions and examples are correct, as far as I can see.

W like wiki (talkcontribs)

Ok Thiemo, thanks for your answer! So Params and sets end in "s" because it is the plural and can contain several parameterS and setS. The "s" in maps is not because there are several maps but because "it maps" something (3rd person), right!?

Thiemo Kreuz (WMDE) (talkcontribs)

"maps" also contains a set of map objects. I updated the text a bit to hopefully make it a bit more clear.

W like wiki (talkcontribs)

Ok, thx Thiemo! Your edits helps, but for maps I still try to find the logic (I am not a programmer, my view is more the one of someone who tries to understand), so:

Thiemo Kreuz (WMDE) (talkcontribs)

Do you plan to work with Citoid or another tool that relies on maps? I find that maps are best understood when approached from that side.

W like wiki (talkcontribs)

No, i found here because I was working on the doc page of C:Template:TemplateBox and I am generally interested in good doc or help pages, and here for me it is still not clear. In chapter "TemplateData object" it is explained:

"Maps (Structure) containing map objects"

so both are different but map objects links to the chapter called Maps Structure. So which of both is described there? Not so clear. Thx

Thiemo Kreuz (WMDE) (talkcontribs)

I really don't know what else I could add. "maps" is a single data structure that goes multiple levels deep. The first level lists consumers by name. The next level lists parameters as they are known by the consumer and maps them to one (as a string) or more (as an array) parameters as they are named in the template.

The consensus seems to be to call the second level in this data structure a "map object".

Not really related, but if you are interested in helping others a good place to start is to convince the community that cryptic parameter names like "1d" or "1sv" are an entirely unnecessary barrier.

W like wiki (talkcontribs)

Ok thank you! I think thats make it clear. I posed a short introduction to the section with your point, I think that also helps others.

And yes, "1d" and "1sv" are really short, I agree with you, was not my creation and I have not the rights to make such big changes for a so widely used template. But in commons many widely used templates using very short parameter names.

My point to make it better (and not having the rights to change the parameter names) is to place comments into a second copy-paste-form (>>my work), because the auto-generated one don't offers this. So if you can help, to introduce this oportunity to TemplateData to place help comments for the parameters in the autogenerated copy-paste-template would be very helpfull! Beste Grüße!

Reply to ""Params" but "Param object""