Template talk:RQ:Twain What Is Man


 * when the module sees a value in the first positional parameter, it tries to use it as the language code for the quote, as it would with the quote template. I suspect it has something to do with "1" being in the list given to propagateparams. Perhaps you need to take "1" out of that list and just make sure that your template code passes 1 to page There is currently a module error at Wiktionary:Quotations/Templates/English T–Z due to this. I checked a transcludes in an entry, and was able to get an error in preview by changing page to 1. Chuck Entz (talk) 23:54, 9 February 2024 (UTC)


 * OK. Since all quotations have been updated to use “Module:quote”, I’m struggling a little to figure out how propagateparams and allowparams work as I’m unsure what parameters need to be explicitly specified under each one. I’ll need to ask for help here. Specifically, if I wish to designate 1 as a synonym for page and other numbered parameters, where do I specify them? Does the order of the parameters listed under propagateparams and allowparams matter? — Sgconlaw (talk) 04:55, 10 February 2024 (UTC)


 * : my understanding is that propagateparams basically tells the module to take the listed parameters as its own, while allowparams basically tells the module not to throw an error if any parameter on the list is present but not in the module's list of permissible parameters. That means you would want to include every parameter possible in allowparams, but be selective with propagateparams. I suspect what you want to do here is leave 1 out of propagateparams, and assign 1 to page if 1 is present. I'm a little fuzzy about whether you would need to include page in propagateparams, but I believe you would. Perhaps  can explain, since he wrote the code. Chuck Entz (talk) 06:30, 10 February 2024 (UTC)


 * Chuck did a great job of explaining the why and how of both two paramaters, so I'll just add some guidelines and examples.
 * Instead of writing,, you can add "foo" to propagateparams. That's it - nothing else should ever go in propagateparams. If you prefer writing the full line, you can keep doing so and never use propagateparams.
 * allowparams is important because it tells the module when it should warn the user that they've made a typo, used the wrong paramater name, or are trying to add data the template is just going to ignore. If you've written  or   anywhere in the template, add "bar" to allowparams.
 * I learn well from examples, so here are some illustrative diffs from the bot conversion: - using propagateparams= instead of individual lines,  - using allowparams,  using pageparam= and textparam=,  using everything,  (lots of variables used inside the template that need to be added to allowparams=),  (lots of lines simplified to "propagatedparams").   displays as expected. For development and debugging, you can build the templates exactly as you've always done, with * and, when everything works, figure out what should go in propagateparams and allowparams. With, you shouldn't include chapter to allowparams because you're generating the chapter inside the template so anything a user passes to chapter will just be ignored.




 * JeffDoozan (talk) 17:28, 15 February 2024 (UTC)
 * ah, you were right! A question: if, for example, 1 and 2 have already been set, do I still need to include 1,2? — Sgconlaw (talk) 19:45, 15 February 2024 (UTC)
 * Sorry for not answering your question in my earlier reply. No, any parameter listed in pageparam or textparam does not need to included manually in allowparams because by listing a parameter in either of those lists, you're already telling the module that it's an allowed parameter.
 * In case you're interested in the technical reason that allowparams exists: everything inside of double  or triple braces   is resolved to text before the module code is run, so   simply becomes First Chapter. This means that athough the module will see all of the parameters provided, it has no way of knowing if   or   was part of the template code, or if they are parameters that were accidentally included by the user. Setting allowparams is the way to tell the module that those parameters exist for a reason and that it shouldn't generate an error when it sees them. JeffDoozan (talk) 20:24, 15 February 2024 (UTC)