We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24374
    • 322 Posts
    Is there any way to specify the sort order the tags in the Manager when editing a resource? They seem to be sorted by tag id in the comboboxes and autotag lists, which isn't very useful. Even if I re-sort the MySQL table on tag name, they are still listed in id order when editing a resource.
      • 1061
      • 81 Posts
      Quote from: rainbowtiger at Nov 02, 2015, 09:35 PM
      Is there any way to specify the sort order the tags in the Manager when editing a resource? They seem to be sorted by tag id in the comboboxes and autotag lists, which isn't very useful. Even if I re-sort the MySQL table on tag name, they are still listed in id order when editing a resource.

      Hi rainbowtiger
      Do U tried to check in snippet Tagger the code, to find out how to get sort?
        • 51755
        • 2 Posts
        Hi rainbowtiger,

        please try this, I had the same wish:

        In

        core/components/tagger/processors/mgr/extra/gettags.class.php

        about row 30

        $c->select($this->modx->getSelectColumns('TaggerTag', 'TaggerTag', '', array('tag')));
        $c->limit($limit, $start);

        add one row:

        $c->select($this->modx->getSelectColumns('TaggerTag', 'TaggerTag', '', array('tag')));
        $c->sortby('tag','ASC');
        $c->limit($limit, $start);

        This worked for me.

        Hey, and this was my first post here ;-) Hello everyone!
          • 24374
          • 322 Posts
          Quote from: michud at Feb 11, 2016, 06:37 PM
          Hi rainbowtiger,

          add one row:

          $c->select($this->modx->getSelectColumns('TaggerTag', 'TaggerTag', '', array('tag')));
          $c->sortby('tag','ASC');
          $c->limit($limit, $start);

          This worked for me.

          That doesn't seem to work for autotags. Version 1.8.0 has the sortby line in it now, and tags are alphabetical in the popup list, but the autotag field is still sorted in a weird order. It's mostly alphabetical, but the first tag appears at the end of the list. If one tag is selected, then that one appears at the end of the list. If more than one are selected, the first selected one appears at the end, and the rest appear at the beginning of the list. So, it looks like the logic is to sort alphabetically, but show the selected tags first, but what's happening is that what should be the first item always gets bumped to the end. [ed. note: rainbowtiger last edited this post 7 years, 3 months ago.]