Help:DPL Manual/Issue:Html-comments in parameter names

Problem
With standard Wiki-syntax it is possible to use comments ahead the equal sign. Consider a template call like:

The result will be the same as without the comments (so the comments are completely ignored). The DPL query does not work like this and the result of the query below will be an empty string:

The parameter names have to be exactly like the template call, including the comment and whitespaces:

Sorry for my lack of English. I hope you understand my problem. Greetings --WiMu 10:44, 4 May 2009 (UTC)

Reply
You are right, DPL currently is not aware of comments which might be embedded within template parameter assignments. You can change this with the following patch in line 540ff of DynamicPageList2Include.php:

if (!$found) { // named parameter $exParmQuote = str_replace('/','\/',$exParm); foreach ($parms as $parm) { if (!preg_match("/^\s*$exParmQuote\s**\s*=/",$parm)) continue; $found=true; $output[$n] .= $dpl->formatTemplateArg(preg_replace("/^$exParmQuote\s**\s*=\s*/","",$parm),$dplNr,$exParmKey,$firstCall,$maxlen); break; }          }

I will make this change part of the next release. 22:52, 5 May 2009 (UTC)