Hi,
I am elaborating a tagging system for my website, that shall be more powerful and comfortable than what I get from the MODx resources repository. I intend to publish it when finished, so that everybody can benefit. But I’m stuck in trying to make the tagging system and Ditto cooperate properly, would you help me, please?
One core characteristic of my tagging system is that the tag is per se (i.e. what is saved in database at the end) just the document id of the respective category page. That alone should not make relevant differences to "literal" tagging approaches, should it?
So, on the category page I just place a Ditto-call that is supposed to retrieve all documents, the template variable ’tags’ (comma-separated list) of which contains the id of the category page.
case 'menu': /*
* use Ditto for making a menu list to all documents with the tag(s) passed
*/
$dittoptions = array();
$dittoptions['extenders'] = 'tagging,summary';
$dittoptions['truncLen'] = 150;
$dittoptions['truncText'] = '???';
$dittoptions['tagData'] = 'tvtags';
$dittoptions['tagMode'] = 'onlyTags';
$dittoptions['tagDelimiter'] = ',';
$dittoptions['debug'] = 0; # whyever debugging doesn't work
$dittoptions['noResults'] = '<p class="weak">Dokumente: —</p>';
$dittoptions['tpl'] = '@CODE:<li><h3>[+title+]</h3><p>[+summary+] [+link+]</p></li>';
$dittoptions['tags'] = $modx->documentIdentifier;
return $modx->runSnippet('Ditto', $dittoptions);
The snippet running this piece of code is called this way in the template:
[*taggongMode:anyof=`1,3`:then=`[!TaggoNG? &do=`menu`!]`*]
In the database, the ’tags’ content is kind of ’37||12|56||...’, but what I get with the aid of $modx->getTemplateVarOutput is ’37,12,56,...’ - just as I expected.
But it does not work. Category pages always yield "Dokumente: —".
Did I miss something? Please tell me.
And tell me also when I reinvent the wheel as such a tagging system already exists

. A retrieval can never be really complete.
Thank you,
agilero.