Thread:Guy Bukzi Montag/@comment-34326785-20200105130302/@comment-34918040-20200114193408

As for your template plan, here are a few general helpful hints:


 * When you write a template, add  directly after the last character, without spaces. This will create a documentation for your template that will be shown when someone displays it.
 * At first, there is only a [create] link. Click on it, and you will get a prefilled page with a predefined structure.
 * Documentation is important
 * for other users trying to understand what you wrote.
 * for yourself. Be assured that you will find it hard to understand what you have written when you revisit a template six months later.
 * for categorization. Categories should always be included on the documentation page, not in the tempate itself.
 * for testing purposes. The  automatically detects if there are test pages for this template and displays the links. The links will be red if there are no such pages.
 * Testing you templates: When other editors start to use your template, they will at best be surprised when you suddenly change something or just test new code that may not work. In the worst case, your changes disrupt the display of hundreds of pages. That's what the /sandbox and /testcases subpages are for. These are the two test pages automatically linked by the documentation template as described above.
 * /sandbox: Copy the code of the original template here, then you can change everything you want without interrupting the display of the original template. Remember that the test version has to be called with  rather than.
 * /testcases: This is a place for you to see your changes in action. You can try out  with different parameters to see if everything works right. As templates and template subpages don't always display changes after saving, you may want to add purge at the top of the page to easily clear the cache and reload the page.
 * Extrapolate pro upgrade price a8 is an example where I added the bike price progression first in /sandbox, tested it in /testcases and then copied the whole new code from /sandbox to the original template when everything worked as expected.

Happy coding!

P. S.: En anglais, « redondant » s'écrit « redundant ». ;-)