We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3093
    • 45 Posts
    Hello all,

    I'm using auto-tag to categorize a bunch of resources, and displaying them all using a tag cloud with tagLister and getResourcesTag. It works great, but apparently when it finds the resources for a certain tag, it matches a string that exists within a tag name, and not the exact tag name.

    For example, I have two tags that are "Men" and "Women." All of the resources under "Women" are also showing up under "Men" even though they do not have the "Men" tag. All I can think is that it is finding the string "men" no matter what may be around it.

    Any ideas on what I can do to fix this problem? Thanks!
      • 4172
      • 5,888 Posts
      I think taglister is searching with LIKE '%searchstring%'

      If you make sure to have doublepipes (||) at front and at the end of all tags,
      it would be possible to search with LIKE '%||searchstring||%'
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 3093
        • 45 Posts
        Just for anyone happening upon this thread in the future, I was able to find a solution. First of all, here's another thread dealing with the same problem:

        http://forums.modx.com/thread/39608/taglister-and-getresourcestag-how-to-reconcile-their-different-behaviour

        And the reply by saerni worked for me:

        http://forums.modx.com/thread/39608/taglister-and-getresourcestag-how-to-reconcile-their-different-behaviour#dis-post-458198
          • 5290
          • 29 Posts
          It's not very clear from the changelog and at the time of posting this reply, the manual hasn't been adjusted either, but in tagLister 1.1.7, getResourcesTag uses a parameter called &tagSearchType. It allows you to match tags in 5 different ways:

          • contains (default)
          • exact (this is probably what you want)
          • beginswith
          • endswith
          • within
            A computer program is a utilitarian typographer's dream - a functioning machine composed completely of type. (John Maeda)