Skip to content

Instantly share code, notes, and snippets.

@matdave
Last active February 21, 2019 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matdave/2d3853aefc9ec1b08bee17af9f4fa9d1 to your computer and use it in GitHub Desktop.
Save matdave/2d3853aefc9ec1b08bee17af9f4fa9d1 to your computer and use it in GitHub Desktop.
getResource with NO tags
[[TaggerGetTags? &groups=`2` &parents=`5` &rowTpl=`tag_groups_tpl`]]
[[getResources:toPlaceholder=`uncategorized`?
&parents=`5`
&limit=`0`
&tpl=`list_row_tpl`
&sortby=`publishedon`
&sortdir=`DESC`
&includeContent=`1`
&includeTVs=`1` &processTVs=`1` &tvPrefix=`tv.`
&where=`["NOT EXISTS (SELECT 1 FROM `modx_tagger_tag_resources` r WHERE r.resource = modResource.id)"]`
]]
[[+uncategorized:ne=``:then=`
<h2>Others</h2>
[[+uncategorized]]
`]]
<div class="row">
<h3>[[+longtitle:default=`[[+pagetitle]]`]]</h3>
<p class="small pb-0">Posted: [[+publishedon:strtotime:date=`%B %e, %Y`]]</p>
<p class="muted">[[+introtext]]</p>
[[+content]]
</div>
<h2>[[+tag]]</h2>
[[getResources?
&parents=`5`
&limit=`0`
&tpl=`list_row_tpl`
&sortby=`publishedon`
&sortdir=`DESC`
&includeContent=`1`
&includeTVs=`1` &processTVs=`1` &tvPrefix=`tv.`
&where=`[[TaggerGetResourcesWhere? &tags=`[[+tag]]`]]`
]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment