Template talk:HasTemplate
Appearance
(Redirected from Template talk:HasTemplate/doc)
Related pages |
---|
Wrapperifying update
[edit]MSGJ, your update to turn it more closely into a wrapper for the new, sandbox functionality at {{Template parameter value/sandbox}} is appreciated. I do like the template culture of positional params, with aliased named params, so I'd like to keep that aspect of it. Thanks again; this update links it more tightly with the new module functionality, and that's a good thing. Mathglot (talk) 09:47, 16 February 2024 (UTC)
- Also, I learned something from your updates. It looks like remaining params are just getting passed through from the template to the module, i.e. your much leaner version never mentions params 2 and 3. Is there a link you can point me to, so I can read up on how this works? Thanks, Mathglot (talk) 09:56, 16 February 2024 (UTC)
- I saw your response to that, at Template talk:Template parameter value#Can it just detect if the template is there; thanks. Mathglot (talk) 11:20, 16 February 2024 (UTC)
- There's a bug somewhere in one of your updates, with respect to the
|follow=
param. If you look at the last example in the § Examples section, that used to work and return "yes", but now it returns empty. Namely, this one:{{Draft:HasTemplate|Transgender history in Australia|Transgender sidebar|follow=1}}
→ yes
- Can you fix that? Mathglot (talk) 11:16, 16 February 2024 (UTC)
- Both the 'N=12' and 'follow=1' examples still fail; these were both broken in rev. 1208028565; they were both working before that. I'll start a test cases page, and seed it with the items in the doc examples for starters. Mathglot (talk) 00:07, 17 February 2024 (UTC)
- The N=12 case fails because the module doesn't have N as an alternative name for the amount of templates, but the template version presumably did before it got stripped down. It's definitely a reasonable name (better than what it is rn) and I've gone ahead and added it to the module, fixing that case.
- The follow=1 case fails because the module checks for args[1] before args.page, and this template provides a value for |page=, meaning if 1 was also specified it would win over follow. Easiest way to fix this is probably to move the follow logic to in the module. Does this sound reasonable? Aidan9382 (talk) 07:35, 17 February 2024 (UTC)
- Both the 'N=12' and 'follow=1' examples still fail; these were both broken in rev. 1208028565; they were both working before that. I'll start a test cases page, and seed it with the items in the doc examples for starters. Mathglot (talk) 00:07, 17 February 2024 (UTC)
For the record: this was followed up and completed as proposed and everything has been working on both ends. Mathglot (talk) 16:43, 26 February 2024 (UTC)