Difference between revisions of "Template talk:Bible link"
From Pathfinder Wiki
Line 3: | Line 3: | ||
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 [[User:Marc3|Marc3]] ([[User talk:Marc3|talk]]) 09:39, 15 April 2018 (EDT) | 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 [[User:Marc3|Marc3]] ([[User talk: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 <nowiki><{{{name|default}}}, or {{{2|default}}}</nowiki>. 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). --[[User:Jomegat|Jomegat]] ([[User talk:Jomegat|talk]]) 12:46, 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 <nowiki><{{{name|default}}}, or {{{2|default}}}</nowiki>. 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). --[[User:Jomegat|Jomegat]] ([[User talk: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? |
Revision as of 01:20, 16 April 2018
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?