Template talk:Bible link
From Pathfinder Wiki
Bible Version
It could be useful to be able to pass the bible version as a parameter so one can link to the version of preference (or may need several versions) it would require to have NIV as default (I haven't found how to do this) so it does not break the pages that are currently using it Marc3 (talk) 09:39, 15 April 2018 (EDT)
- It's possible to add a new parameter to a template and assign it a default value, but it can be tricky. There are two types of parameters: named, and positional. Named are always better, but we didn't necessarily know that when we created some of them. The other type of parameter is positional (the numbered ones). They can be mixed, but that gets messy. The syntax for providing a default value is <{{{name|default}}}, or {{{2|default}}}. The best approach for making changes to active-use templates is to make a copy (with a different name), make the changes to it, and try it out on one of your user pages. When you're happy with it, copy it to the hot version. Another approach is to redevelop it as a separate template, and then edit all the pages that use the old one so that they use the new one (and when that's done, remove the old one). --Jomegat (talk) 12:46, 15 April 2018 (EDT)
- You were right, creating the template with the parameters as I suggested was easy, but making it compatible with the existing references is tricky. Updating all references would be very time consuming, so it is better to stick with the positional parameters that is already been used (named parameters would break everything that currently uses it, I was hoping it wouldn't... ).
- Besides this, if I create a sandbox page ... how can I delete it after I have tested what I needed?
- Only admins can delete pages. It's easier to just create a page in your user space or in the Sandbox and blank it when you're done. I often have one in my user space for experiments, and just leave it there until I have another experiment to try. --Jomegat (talk) 23:42, 15 April 2018 (EDT)
- One other thing - you could just use two positional parameters with a default of NKJV (I think that's what you want rather than NIV) for {{{2}}}. Named parameters are easier to use (and allow you to omit either), but I don't think we'd ever need to use a default value for {{{1}}}, so it would always be there. --Jomegat (talk) 23:50, 15 April 2018 (EDT)
- Only admins can delete pages. It's easier to just create a page in your user space or in the Sandbox and blank it when you're done. I often have one in my user space for experiments, and just leave it there until I have another experiment to try. --Jomegat (talk) 23:42, 15 April 2018 (EDT)