New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • 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.
    • 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?
      • 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!
        • 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 2 years, 1 month ago.]