https://bugzilla.wikimedia.org/show_bug.cgi?id=52581

--- Comment #4 from kipod <[email protected]> ---
i did it long ago, and published it on
[[en:Wikipedia:WikiProject_User_scripts/Scripts#Scripts]]. the script page on
enwiki is [[en:User:קיפודנחש/TemplateParamWizard]]. the script source itself is
practically identical to the hewiki one, except maybe some recent
enhancement(s) to the hewiki script (for instance, by default, the wizard does
not leave empty parameters on the page, but some users asked for this as an
option, so now the hewiki script learned to support on more option).


the wizard uses a similar construct to "templatedata", but instead of having
this information on the template page, it uses a subpage with a fixed name (in
enwiki, this fixed name is "Parameters", so for Template:Foo, the templatedata
equivalent will be in Template:Foo/Parameters).

when the subpage does not exist, the wizard extracts the list of parameter
names from the template itself, with some fixed attributes (for instance, in
this case it assumes that each parameter is "multiline")

i believe there are several people on enwiki who actually use this (at least
there were) - you probably want to ask them about their experience (something
like

https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=advanced&search=TemplateParamWizard+intitle%3Ajs&fulltext=Search&ns2=1&redirs=1&profile=advanced



the wizard supports some attributes that, to the best of my knowledge,
"templatedata"/VE do not support yet, which i think would be good ideas:

-- "Extended": this allows the designer to designate some fields as
"secondary", which means they are not visible when the form opens. if there is
at least one "Extended" parameter, the form will grow a new checkbox "Show all
fields", which allows the user to show/hide the "Extended" fields.

-- "Choices": this allows the designer to declare that a certain parameter has
a fixed set of "legal" values. very useful when the template uses a parameter
as an input for {{#switch:

-- "Depends on": only expose this field if some other field is not empty. very
useful for templates with many repetitions (e.g., [[en:Template:Track
listing]]: you make "title4" depend on "title3", and then "note4", "writer4",
"lyrics4", "music4", "extra4", "length4", and finally "title5" all depend on
"title4"). without this feature, the wizard is much less useful for templates
of this type.


peace.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to