Closed oksushi closed 12 years ago
I think the conditional templates feature provided by @freejung as pull request #58 should meet this requirement. I will work on integrating that capability soon.
Yes, this is exactly the sort of thing I had in mind. The call would look like:
[[getResources? &tplCondition = parent
&conditionalTpls = {"1":"parent1Tpl", "2":"parent2Tpl", "3":"parent3Tpl"}
&tpl = defaultTpl
]]
Where the numbers in the JSON array are the ID numbers of your parent resources.
It would be useful to be able to specify a different tpl to use base on the source parent. This could work similar to tplN, perhaps along the lines of tplParent1=``, where Parent1 is the first ID declared in the parent snippet call attributes.
This would eliminate the need to use conditional filters in a tpl chunk when trying to use different HTML based on the parent.