Template talk:WPBannerDoc
Question
[edit]Could this template automatically be transcluded on to the template page of project banners? Or perhaps with a parameter |auto-doc=yes
? — Martin (MSGJ · talk) 22:56, 18 December 2020 (UTC)
- In theory, yes, but even if you consider the basic parameters
|category=
|listas=
(and formerly|small=
), not all banners support all of them (even though they all should); and you would also have to check the existing doc to remove those if already present, to avoid double-documentation. This is why I've been doing them individually and manually. --Redrose64 🌹 (talk) 08:56, 19 December 2020 (UTC)- We can auto-detect if banners are using most of those parameters - the only exception seems to be listas but that's an easy upgrade to do. If we had a doc parameter, then it would default to the current behaviour, e.g.
|doc=none
, but then that could be manually changed to|doc=auto
which would call this template. Worth a play around in the sandbox perhaps? — Martin (MSGJ · talk) 16:40, 19 December 2020 (UTC)
- We can auto-detect if banners are using most of those parameters - the only exception seems to be listas but that's an easy upgrade to do. If we had a doc parameter, then it would default to the current behaviour, e.g.
First draft coded on Template:WPBannerMeta/templatepage/sandbox and results can be seen on Template:WikiProject Doctor Who/sandbox. I now realise that for this to work properly, a few additional parameters will be passed to define the name of taskforce and note parameters, e.g. |TF_1_PARAMETER=Torchwood-task-force
— Martin (MSGJ · talk) 16:37, 20 December 2020 (UTC)
|Torchwood-task-force=
aside, why is|listas=
omitted? Where has the example and the copy-and-paste boilerplates gone? --Redrose64 🌹 (talk) 17:24, 20 December 2020 (UTC)- Give me a chance! This is only the very first draft. As I explained above listas needs a slight change, which I will do shortly. Examples can also be generated automatically. The beauty is that when the template is changed, its documentation alters accordingly. — Martin (MSGJ · talk) 19:33, 20 December 2020 (UTC)
- Listas is now working. Boilerplate and example added. — Martin (MSGJ · talk) 11:47, 21 December 2020 (UTC)
I think the parameter name can be obtained using a text search on the template itself, which would be extremely useful. I have posted at Module talk:String/Archive 1#Read parameter for advice. — Martin (MSGJ · talk) 10:45, 21 December 2020 (UTC)
- Success! We can now automatically deduce the names of the parameters. Latest version at Template:WikiProject Doctor Who/sandbox ready for review ... — Martin (MSGJ · talk) 19:51, 21 December 2020 (UTC)
Listas example
[edit]I'm assuming that a specific example related to the WikiProject (e.g. Jack Harkness for Doctor Who) is not really needed? A generic name like John Doe should suffice. — Martin (MSGJ · talk) 13:23, 21 December 2020 (UTC)
Conversion
[edit]@Redrose64: just to let you know that I am finally getting round to converting this to work with Module:WikiProject banner. I have a way to go, but current code is on Module:WikiProject banner/templatepage/sandbox and an example can be seen at Template:WikiProject Medicine/sandbox. — Martin (MSGJ · talk) 16:59, 10 October 2023 (UTC)
- OK, but please take note, I cannot write Lua code. I will therefore be completely unable to make amendments, bugfixes, enhancements etc. --Redrose64 🌹 (talk) 21:47, 11 October 2023 (UTC)
- That's understood. But you could make suggestions for improvements, etc. — Martin (MSGJ · talk) 15:45, 1 November 2023 (UTC)