Difference between revisions of "Issue:Includematch with multiple pattern"
From FollowTheScore
(New page: {{Issue |Type = Change Request |Extension = DPL |Version = 1.8.9 |Description = Includematch should be able to run multiple patterns on the same include |Status = op...) |
|||
Line 21: | Line 21: | ||
But this does only filter with the first pattern - if this matches, the second pattern is ignored .. | But this does only filter with the first pattern - if this matches, the second pattern is ignored .. | ||
+ | |||
+ | An alternative would be a way to "invisibly include" a template, so one could use | ||
+ | <nowiki> | ||
+ | {{#dpl: | ||
+ | |category=Car | ||
+ | |include={Car}:name,{Car}:color,{Car}:seats | ||
+ | |includematch=/color\s*=\s*Red/is,/seats\s*=\s*4/is | ||
+ | |display=1,-,- | ||
+ | }} | ||
+ | </nowiki> (or whatever else syntax to include the same template multiple times, but display it only once). | ||
== Reply == | == Reply == |
Revision as of 00:28, 4 January 2010
Description: | Includematch should be able to run multiple patterns on the same include |
Extension / Version: | DPL / 1.8.9 |
Type / Status: | Change Request / open |
Problem
I want to search a single include for multiple patterns, all of which have to match. (Example: A single template car having 5 parameters name,color,size,seats,format. Now I want to search for all cars having 4 seats and red color.
AFAIK it should be possible using something akin to
{{#dpl: |category=Car |include={Car}:name |includematch=/color\s*=\s*Red/is,/seats\s*=\s*4/is }}
But this does only filter with the first pattern - if this matches, the second pattern is ignored ..
An alternative would be a way to "invisibly include" a template, so one could use
{{#dpl: |category=Car |include={Car}:name,{Car}:color,{Car}:seats |includematch=/color\s*=\s*Red/is,/seats\s*=\s*4/is |display=1,-,- }} (or whatever else syntax to include the same template multiple times, but display it only once).