From getResources to pdoTools + TagLister

I’m moving all my getResources/getPage calls over to pdoTools (inc. pagination) and I’m neariy done but this one is clearly not a “drop-in” replacement.

I’m using TagLister (and a custom pset) in conjunction with getResources to return a list of Resources filtered by tag name and to also generate pagination. It all works as expected. But when I change the call from getResources to pdoResources (or pdoPage) no filtered results are returned.

So my question is how can I replicate this functionality using pdoTools and TagLister? Or does pdoTools have a “tag” replacement for TagLister? I didn’t see anything in the docs.

Here’s my current getResources + TagLister call:

[[!getResourcesTag@TagLister?
    &elementClass=`modSnippet`
    &element=`getResources`
    &parents=`0`
    &tagKey=`tag`
    &toPlaceholder=`results`
    &tpl=`tagFilter`
    &hideContainers=`1`
    &sortdir=`DESC`
    &limit=`6`
    &pageLimit=`5`
    &totalVar=`total`
    &includeTVs=`1` 
    &processTVs=`1`
]]
[[!+results:notempty=`<h1>[[+resultMessage]]</h1>`]]
<ol>
    [[!+results:ifempty=`<p>The term [[!getUrlParam? &name=`tag`]] is not used anywhere else.</p>`]]
</ol>
[[!+page.nav:notempty=`<nav>
    <ul>
        [[!+page.nav]]
    </ul>
</nav>`]]
1 Like

Have you seen this old forum thread? I think there’s some pretty detailed explanation for using Tagger with pdoResources. Sorry I haven’t seen any examples with TagLister…
https://forums.modx.com/thread/95632/tagger-examples-wanted?page=3#dis-post-543905

1 Like

Thanks @lucy, I missed that thread but it looks useful.

I’m tempted to leave things as they are with getResources and TagLister (it works well) but I’ve already transitioned everything else to pdoTools so I would like to make a clean break with getResources/getPage.

Todd

1 Like