Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Luna Garden Moderator
    #935212
    1. list text here

      In order to make K2 Tag order by Alphabetical, please go to file:

      modules/mod_jak2filter/helper.php

      Find for:

      $query ="SELECT t.id as value,t.name as name".
                  " FROM #__k2_tags AS t".
                  " LEFT JOIN #__k2_tags_xref AS tx ON t.id = tx.tagID";
          if ($cat_ids) {
              $query .= " LEFT JOIN #__k2_items as ki ON tx.itemID = ki.id";
              $query .= " WHERE ki.catid IN ($cat_ids) AND t.published=1";
          } else {
              $query .= " WHERE t.published=1";
          }
          $query .=" GROUP BY t.id";

      change to:

      $query ="SELECT t.id as value,t.name as name".
                  " FROM #__k2_tags AS t".
                  " LEFT JOIN #__k2_tags_xref AS tx ON t.id = tx.tagID";
          if ($cat_ids) {
              $query .= " LEFT JOIN #__k2_items as ki ON tx.itemID = ki.id";
              $query .= " WHERE ki.catid IN ($cat_ids) AND t.published=1";
          } else {
              $query .= " WHERE t.published=1";
          }
          $query .=" GROUP BY t.id order by t.name ASC";

      and find and comment line:

      @sort( $values, SORT_REGULAR );

    jabba84 Friend
    #936356

    Works prefectly, thank you.
    Gianluca

    p.s: the path of the file in your answer is wrong, missing a "/" before "helper". The line to be commented was already commented.. don’t know why 🙂
    Thank you again!

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  jabba84 7 years, 11 months ago.

The topic ‘Sort K2 tags alphabetically’ is closed to new replies.