On a blog/news page I want to show related articles using the Tagger extra. (ModX 2.7.3, newest versions of extra’s)
So I have taggerGetTags fetch the tags for the current resource in taggerGetResourcesWhere in pdoResources tags as follows:
1248 is the id of the newspages container.
[[!pdoResources?
&parents=`1248`
&exclude=`[[*id]]`
&depth=`1`
&where=
`[[!TaggerGetResourcesWhere?
&tags=`[[!TaggerGetTags? &resources=`[[*id]]` &rowTpl=`tag` &separator=`,` &outTpl=`tags`]]`
]]`
&tpl=`blogTextImgRelatedBlocks`
&sortby=`RAND()`
&showLog=`0`
]]
This shows articles with similar tags, that’s working ok. But I don’t want to show the current article in the related articles.
I tried
&parents=1248, -[[*id]]
, &resources=-[[*id]]
, &exclude=-[[*id]]
all not working, ie. the current article is not excluded.
How can I achieve this?