<![CDATA[ Displaying articles tag results - My Forums]]> https://forums.modx.com/thread/?thread=95982 <![CDATA[Displaying articles tag results]]> https://forums.modx.com/thread/95982/displaying-tag-results-in-articles#dis-post-519464
I want to be able to set up the tags properly on my articles pages, but I am really struggling. I have read various forum posts and the rather limited official documentation but it has not go me anywhere.

I can successfully list on my individual article page the list of tags for that article using:

[[!toLinks? &items=`[[*articlestags]]` &target=`321`]]


This provides a set of links in the format: "../tag-results.html?tag=[tag name]&key=tags This is correctly targeted at resource 321, my tag-results.html page.

However, whatever I try, I have simply been unable to actually show the list of the articles using a specific tag on the results page - it simply remains blank. This is an area where I think the documentation is particularly weak/confusing. It is not intuitive at all..

Can someone provide a step-by-step approach? I'm sure it would be a great help to others as well as me!]]>
neiltipton Jan 29, 2015, 10:26 AM https://forums.modx.com/thread/95982/displaying-tag-results-in-articles#dis-post-519464
<![CDATA[Re: Displaying articles tag results]]> https://forums.modx.com/thread/95982/displaying-tag-results-in-articles#dis-post-522942 Quote from: neiltipton at Jan 29, 2015, 04:26 PM
This seems like it should be simple, but I've been consistently getting nowhere for hours now!

I want to be able to set up the tags properly on my articles pages, but I am really struggling. I have read various forum posts and the rather limited official documentation but it has not go me anywhere.

I can successfully list on my individual article page the list of tags for that article using:

[[!toLinks? &items=`[[*articlestags]]` &target=`321`]]


This provides a set of links in the format: "../tag-results.html?tag=[tag name]&key=tags This is correctly targeted at resource 321, my tag-results.html page.

However, whatever I try, I have simply been unable to actually show the list of the articles using a specific tag on the results page - it simply remains blank. This is an area where I think the documentation is particularly weak/confusing. It is not intuitive at all..

Can someone provide a step-by-step approach? I'm sure it would be a great help to others as well as me!




Hi neiltipton

you need to add

[[!getResourcesTag? &parents=`1,2,3,4` &tagKey=`blog-tags` &toPlaceholder=`results` &tpl=`tpl_result`]]
<ul>
[[!+results]]
</ul>


in your 321 resource, with your information obviously,

later in you `tpl_result` chunk, you should put this:

<li>
<a href="[[~[[+id]]]]">[[+pagetitle]]</a>
</li>



I hope this help smiley]]>
yuliyepes Mar 18, 2015, 12:08 PM https://forums.modx.com/thread/95982/displaying-tag-results-in-articles#dis-post-522942