Difference between revisions of "Template talk:Bible link"

From Pathfinder Wiki
m
Line 2: Line 2:
  
 
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, and with with 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)

Revision as of 16:46, 15 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, and with with 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)