MODX Revolution 2.2.8-pl (traditional)
MySQL: 5.5.37-0ubuntu0.12.04.1
PHP: 5.4.28-1~dotdeb.0
I'm doing a code cleanup based on an SEO audit of the site and one of the issues that was found is that we have different URLs for identical tag landing pages eg.
mydomain.com/tag-results?tag=foo
and
mydomain.com/tag-results?tag=foo&key=tags
The problem comes from the toLinks snippet appending the parameter onto the end of the URL, here is how I am using tagLister and toLinks:
tagLister
<!-- Snippet call -->
[[tagLister? &tv=`tags` &target=`10` &limit=`99` &tpl=`tag-list` &parents=`2`]]
<!-- Output -->
<li class="[[+cls]]">
<a href="[[~[[+target]]? &[[+tagVar]]=`[[+tag]]`]]">[[+tag]]</a>
</li>
toLinks
Tags: [[tolinks? &items=`[[+tv.tags]]` &key=`tag` &target=`10`]]
I also tried removing the
from the toLinks call altogether which surprisingly made absolutely no difference and the snippet carried on working as before outputting the same URLs so not sure why it's included in the documentation here:
http://rtfm.modx.com/extras/revo/taglister/taglister.tolinks
Any help would be much appreciated.