Okay - I’ve searched and read documentation and either I’m just not seeing it (quite possible), or just the right info isn’t easy to find.
I’m using keywords as tags with this call (split on separate lines for ease of reading):
[!Ditto?
&parents=`8`
&depth=`0`
&seeThruUnpub=`1`
&tpl=`Tpl_ditto_jns2009`
&dateFormat=`%G.%m.%e %I:%M`
&keywords=`1`
&tagDisplayDelimiter=`, `
&tagData=`keywords`
&tplTagLinks=`Tpl_blogKeywordLink`
&paginate=`1`
&display=`10` !]
The issue is that when multiple keywords are on a single article, they all get wrapped up in one link. So instead of having something like:
Tag1,
Tag2,
Tag3 (3 separate links)
I get:
Tag1,Tag2,Tag3 (all tags are one giant link)
(Also note that there are no spaces after commas as specified in the snippet call).
Any ideas?
Standard Disclaimer
I could be totally wrong.
How have you configured your TV ’keywords’ ?
I think you need to use &tagDelimiter parameter.
Keywords isn’t a TV. They’re the built in MODx keywords. It seemed logical to use keywords so that a defined set of "tags" could be created to choose from rather than leaving it to the authors to be consistent. Further, as I understand it, MODx "keywords" can be entire phrases, whereas the Ditto TV tags field seem to be limited to single words. (See disclaimer below!)
I believe I tried the &tagDelimiter and it didn’t work either... or are you suggesting using both? Maybe I’ll give that a shot in the mean time.
Standard Disclaimer
I could be totally wrong.
EUREKA!
@ tkfm
Not sure if you intended it this way but this fixed it:
I added the &tagDelimiter=`,` parameter, which apparently tells Ditto how to recognize (internally) where one tag stops and the next one starts. The &tagDisplayDelimiter=`, ` then tells Ditto how to display the separate tags. My problem was I was only considering output and so had tried both tagDelimiter AND tagDisplayDelimiter as `, ` (comma-space) - which meant Ditto couldn’t break apart the list of keywords because there was no space. So it assumed it was all one giant keyword.
Cool. Thanks for the idea. I’m one step closer.
Standard Disclaimer
I could be totally wrong.
Thanks for this solution JaredC. I had some trouble figuring out what the correct delimiter was for MODx keywords.
The default Tag Delimiter is ` ` (space), which means that if you do not use any tagDelimiter parameter, keywords are considered separately (instead of keyphrases)
I fiddled with several different delimiters, but the right one is indeed , (comma, without any space before or behind).