Difference between revisions of "Issue:Include positional template parameter"

From FollowTheScore
Jump to: navigation, search
(Reply)
Line 9: Line 9:
 
== Problem ==
 
== Problem ==
 
MediaWiki template parameters are by default numbered but the templates can be called by name. For example, if I have a template that takes one unnamed argument, I can call the template like <nowiki>{{template|arg}}</nowiki> but I can also call it as <nowiki>{{template|1=arg}}</nowiki>. The reason to use the second form is if arg contains an equals sign (so in general it's safer to use the second form if you don't know what arg could be. DPL does not appear to be able to handle this. If I try using <nowiki>include={template}:1</nowiki>, it doesn't find the argument correctly if I use <nowiki>{{template|1=arg}}</nowiki> to call the template.
 
MediaWiki template parameters are by default numbered but the templates can be called by name. For example, if I have a template that takes one unnamed argument, I can call the template like <nowiki>{{template|arg}}</nowiki> but I can also call it as <nowiki>{{template|1=arg}}</nowiki>. The reason to use the second form is if arg contains an equals sign (so in general it's safer to use the second form if you don't know what arg could be. DPL does not appear to be able to handle this. If I try using <nowiki>include={template}:1</nowiki>, it doesn't find the argument correctly if I use <nowiki>{{template|1=arg}}</nowiki> to call the template.
 
 
 
 
 
 
  
 
== Reply ==
 
== Reply ==
Yes. Now (Release 1.4.4) DPL treats numerich template parameters correctly.
+
Thank you for the precise report. I fixed the bug. Now (Release 1.4.4) DPL treats numeric template parameters correctly.
 
:--[[User:Gero|Gero]] 18:34, 29 September 2007 (CEST)
 
:--[[User:Gero|Gero]] 18:34, 29 September 2007 (CEST)

Revision as of 17:35, 29 September 2007

Description: including positional template parameters can fail depending on form of template call
Extension / Version: DPL   /   1.4.3
Type / Status: Bug   /   open

Problem

MediaWiki template parameters are by default numbered but the templates can be called by name. For example, if I have a template that takes one unnamed argument, I can call the template like {{template|arg}} but I can also call it as {{template|1=arg}}. The reason to use the second form is if arg contains an equals sign (so in general it's safer to use the second form if you don't know what arg could be. DPL does not appear to be able to handle this. If I try using include={template}:1, it doesn't find the argument correctly if I use {{template|1=arg}} to call the template.

Reply

Thank you for the precise report. I fixed the bug. Now (Release 1.4.4) DPL treats numeric template parameters correctly.

--Gero 18:34, 29 September 2007 (CEST)