We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17673
    • 194 Posts
    ’
    &Keywords=1’
    Enable fetching of associated keywords for each document
    Can be used as [+keywords+] or as a tagData source

    the [+keywords+] placeholder is working, but how is the tagData-thing implemented?
    I tried &tagData=[*keywords*] in a working example of tagging. but this returns nothing;
    ...actually [*keywords*] is not even listed as a Document-Specific Template Variable in the MODx docs
      ----------------------------------------------------------
      http://www.linkedin.com/in/lucapost/
      http://www.twitter.com/lukwe/
      ----------------------------------------------------------
      • 25663 MODX Staff
      • 12,272 Posts
      always wrap snippet params in backticks: &tagData=`blah or [*blah*] or [+blah+]`
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 18397
        • 3,250 Posts
        &tagData=`keywords`
          • 17673
          • 194 Posts

          back to my Ditto tests after a few weeks;
          to figure out the right TagDelimiter for this, I looked into ditto.class.inc.php:

          function fetchKeywords($resource) {
          ...
          $metas = implode(",",$modx->getKeywords($resource["id"]));
          ...
          }

          hence &tagDelimiter=`,` should work; but it did not, placeholders [+keywords+], [+haskeywords+]
          , [+tagLinks+]
          just returned: keywords:, haskeywords:1, tags: None


          then I tried &tagData=`Keywords` (capital K) -> [+keywords+] placeholder got populated correctly, but [+tagLinks+] still returns ’None’

          My almost successful Ditto call is:
          [[Ditto?parents=`13` &extenders=`summary,dateFilter,tagging,request` &filter=`DittoFilter,dynSpotLight,7` &keywords=`1` &tagData=`Keywords` &tagDelimiter=`,` &tagDocumentID=`495` &tpl=`DittoSpotlightTests`]]


          HELP! anyone has a working example?
          I tried looking into tagging.extender.inc.php but got lost.
          I added/removed &givenTags=`[+keywords+]`&caseSensitive=`1` without any effects.
          Checking the debug (attached) one discovers that:


          • both keywords and Keywords are defined in ’Fields->Display->Unknown’
          • ’Prefetch Data’ displays empty fields for keywords
          • ’Retrieved Data’ displays the correct Modx keywords




            ----------------------------------------------------------
            http://www.linkedin.com/in/lucapost/
            http://www.twitter.com/lukwe/
            ----------------------------------------------------------
            • 18397
            • 3,250 Posts
            This set of parameters should work using the latest development version:
            &keywords=`1`&tagDelimiter=`,`&tagData=`keywords`
            
              • 17673
              • 194 Posts

              Check ’ditto_rev_1436.tar.gz’, I cannot expand it with latest Stuffit on Mac OS X 10.4.

              Anyhow I went into DittoTRAC and applied the 2 modifications of ChangeSet 1434 to ditto.class.inc.php/stable (0.9.6); now MODx keywords are correctly extracted and linked as TAGS.

              Pretty cool!
              -much better then having an extra TV for Tags, since the MODx core already provides keywords management for documents.

              I’m just missing the rel-tag microformat thingy now!
                ----------------------------------------------------------
                http://www.linkedin.com/in/lucapost/
                http://www.twitter.com/lukwe/
                ----------------------------------------------------------
                • 17673
                • 194 Posts
                ’ditto_rev_1436.tar.gz’, I cannot expand it with latest Stuffit on Mac OS X 10.4.

                does not expand neither with winzip under Windows XP...
                  ----------------------------------------------------------
                  http://www.linkedin.com/in/lucapost/
                  http://www.twitter.com/lukwe/
                  ----------------------------------------------------------
                  • 18397
                  • 3,250 Posts
                  Should be fixed now thanks to Victor Brilon’s awesome shell scripting skills.
                    • 17673
                    • 194 Posts

                    rev 1438 works fine, thanks

                    orderByeBye!!
                      ----------------------------------------------------------
                      http://www.linkedin.com/in/lucapost/
                      http://www.twitter.com/lukwe/
                      ----------------------------------------------------------