Publishing Categories

Discussion in 'Subrion CMS Plugins Discussion' started by bosshog001, Nov 10, 2008.

  1. bosshog001

    bosshog001 New Member

    How can I get the Publishing Categories to show in alpha order?
  2. Vasily_B.

    Vasily_B. Project Manager

    Hot to sort articles categories in ABC order in 'Browse Categories' mode:
    1. open file packages/publishing/includes/classes/sbr.front.category.php
    2. find function getArticleCategories
    3. Replace line
    PHP:
    $sql .= false === $aIdParent ?  false : "AND `id_parent`='{$aIdParent}' ";
    with next
    PHP:

    $sql .= false === $aIdParent ?  false : "AND `id_parent`='{$aIdParent}' ";
    $sql .= "ORDER BY `title` ";
     
  3. bosshog001

    bosshog001 New Member

    Thanks for your help
  4. Vasily_B.

    Vasily_B. Project Manager

    Always at your service.
  5. bosshog001

    bosshog001 New Member

    How do I get the sub-categories to show under the Publishing Category Block?

    So Lets say I have a category called Stories and I have a sub-category called fictional what I would like to see is the following

    Stories
    Fictional Stories
  6. Vasily_B.

    Vasily_B. Project Manager

    open file plugins/pub_cats/install.xml find line
    PHP:
        $result = $sbrDb->all('`title`, `path`', '`level`=1 AND `num_all_articles`>0', 0, 0, 'articles_categories');
    and replace with
    PHP:
        $result = $sbrDb->all('`title`, `path`', '`num_all_articles`>0', 0, 0, 'articles_categories');

Share This Page