Template talk:Exams

Proposed edit of template
I think someone screwed up when making this template.

The "your name" parameter is where you have to put the date, and the "date you will be back" is where you have to put your name. Can someone fix this? I would fix it myself, but when I was trying to edit the source for the template, I realized that editing a template is something that I don't know how to do. Toad40 (talk) 13:47, 6 May 2022 (UTC)


 * I'll try to fix it myself, but if I can't fix it. I'll just undo my changes and let someone else fix it. Toad40 (talk) 13:48, 6 May 2022 (UTC)
 * Ok, I tried. However, I know nothing about fixing templates. Toad40 (talk) 13:59, 6 May 2022 (UTC)

The "your name" parameter is where you have to put the date, and the "date you will be back" is where you have to put your name. Can someone fix this? I would fix it myself, but when I was trying to edit the source for the template, I realized that editing a template is something that I don't know how to do.
 * The issue here is that tried to re-write the template a few years back but other editors disagreed and reverted their changes. The editor who undid their edits to the template forgot to undo their changes to the documentation page though, so we ended up with a template that expected the old parameter ordering, but documentation that listed the new parameter ordering. I've fixed the template documentation so it lists the parameters in the correct order. 163.1.15.238 (talk) 16:19, 6 May 2022 (UTC)


 * Just thought you might also find it useful to know why your attempted fix didn't work. you can use this template with either zero, one or two parameters,,   or  . The if statement in the template   is checking how many parameters you have supplied and whether the template should be operating in two parameter or one parameter mode - this basically says "if parameter 2 exists then Name=parameter2, if parameter 2 doesn't exist Name=parameter1, if parameter1 is empty use the Name of the Page it's been put on without prefix" (that's what the   WP:Magic word does). When you swapped the 1's and 2's in that bit of code you changed it to say "if parameter 1 exists then Name=parameter1, if parameter 1 doesn't exist Name=parameter2 ..." which can't work because you can't have parameter 2 without parameter 1. 163.1.15.238 (talk) 16:34, 6 May 2022 (UTC)
 * OOOhhhh, that explains it. Anyways, thanks for fixing it! Toad40 (talk) 17:02, 6 May 2022 (UTC)