I'm using Tagger to create categories & tags for a MODX blog. I've been able to get most of the Tagger functionality doing what I need, however when I created a Category (resource/set as container) and put the &target to the ID of the Category resource, I'm not getting any results.
Category Template - getPage Call
<h4>Recent Posts</h4>
[[!getPage?
&elementClass=`modSnippet`
&element=`getResources`
&parents=`[[++blog_id]]`
&depth=`0`
&limit=`10`
&pageVarKey=`page`
&includeTVs=`1`
&processTVs=`1`
&tvPrefix=``
&tpl=`blogit.recent_posts_tpl`
&sortby=`publishedon`
&sortdir=`DESC`
&where=`[[!TaggerGetResourcesWhere]]`
]]
<div class="paging"> <ul class="pageList"> [[!+page.nav]] </ul></div>
blogit.recent_posts_tpl
<div class="post">
<p class="post-date"><time datetime="[[+publishedon:strtotime:date=`%y-%m-%d`]]">[[+publishedon:strtotime:date=`%b %d %Y`]]</time></p>
<div class="row collapse cat-[[!TaggerGetTags? &resources=`[[+id]]` &groups=`2` &rowTpl=`tag_class_tpl`]]">
<div class="small-12 medium-5 columns">
<a href="[[~[[+id]]]]"><img src="[[+blogit.post_main_image:phpthumbof=`&zc=[[++blogit.main_image_overview_cz]]`]]" alt="[[+blogit.post_main_image_alt]]"></a>
</div> <!-- post img -->
<div class="small-12 medium-7 columns">
<div class="post-content">
<a href="[[~[[+id]]]]">
<h4>[[+longtitle:strip_tags:empty=`[[+pagetitle:strip_tags]]`]]</h4>
<p>[[+content:ellipsis=`70`]]</p>
</a>
<a href="[[~[[+id]]]]" class="read-more">Read more <i class="fa fa-angle-right"></i></a>
</div>
</div><!-- post content-->
</div>
</div> <!-- end post -->
Category List (links to category page)
[[TaggerGetTags?
&outTpl=`blogit.cat_wrapper_tpl`
&rowTpl=`blogit.cat_links_tpl`
&groups=`2`
&showUnused=`1`
&sort=`{"rank": "DESC"}`
&target=`[[++category_id]]`
]]`]]
Oddly enough, the page nav for getPage is outputting a pagination but no posts are being returned. I've followed pretty much everything that I can think of using this as an example:
https://github.com/dubrod/MODX-Blog-Skeleton
[ed. note: mayhemchaos last edited this post 7 years ago.]
Sal Baldovinos
SEO & DIGITAL MARKETING
ARIEL DIGITAL | Maximize Your Potential
www.arieldigitalmarketing.com
Classic developer moment. I fixed, but I don't know how
Sal Baldovinos
SEO & DIGITAL MARKETING
ARIEL DIGITAL | Maximize Your Potential
www.arieldigitalmarketing.com
Typo. I freaking typo. I hope I come across my own post again via Google and kick myself in the rear.
Sal Baldovinos
SEO & DIGITAL MARKETING
ARIEL DIGITAL | Maximize Your Potential
www.arieldigitalmarketing.com