I'm returning pdoResources results to a two-column unordered list, and need the results to stack rather than list side-by-side. There are CSS hacks for this, but then I'd also have to hack the framework so separate snippet calls seems easier. Right.
The first call outputs 1-6, the second 6+. The second call returns the full list of results, though...
[[!pdoResources?
&parents=`[[*parent]]`
&depth=`1`
&showHidden=`1`
&tplCondition=`menuindex`
&tplOperator=`isgreaterthan`
&conditionalTpls=`{"6":"guide_footerMenuItem"}`
&tpl=`guide_footerMenuItem`
&sortby=`{"menuindex":"ASC"}`
&includeTVList=`pagetitle,longtitle,id`
&tvPrefix=``
]]
Is it the tplCondition, tplOperator, or both, causing this? Based on a couple example usages for these params found on the forum, I thought this would be OK, but obviously not.
A separate but related question -- I tried the above using &idx, which "indicate[s] the initial number of iteration for result output", but the call returns the full list of results. Do I have the wrong idea about &idx? Here's that call:
[[!pdoResources?
&parents=`[[*parent]]`
&depth=`1`
&showHidden=`1`
&idx=`7`
&tpl=`guide_footerMenuItem`
&sortby=`{"menuindex":"ASC"}`
&includeTVList=`pagetitle,longtitle,id`
&tvPrefix=``
]]
Ultimately, I got this to work:
[[!pdoResources?
&parents=`[[*parent]]`
&depth=`1`
&showHidden=`1`
&tvFilters=`menuindex>>5`
&tpl=`guide_footerMenuItem`
&sortby=`{"menuindex":"ASC"}`
&includeTVList=`pagetitle,longtitle,id`
&tvPrefix=``
]]
What I don't like about any of these approaches is that they're not dynamic. It would be great to include this in the template such that it breaks the results in half using &limit=totalVar/2 or something. Assuming this level on conditional would require a custom snippet, though...