Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • librandi Friend
    #939141

    Hi,
    in home 2 position, I’ve a Magazine – Category Listing : style-2 , I can’ t order the categories. I would first boutique hotel and enjoy experience, but they are always lower, can you help me please

    Elinam21 Friend
    #939144

    Also interested in this solution. Why the categories choose to arrange themselves any how on the page. How can I order the categories.

    Saguaros Moderator
    #939972

    At this moment, it will display categories in order shown in category settings option of module.

    I also pass this to the team for further consideration: http://pm.joomlart.com/browse/JATELINEV-349

    librandi Friend
    #939987

    I had tried to change it in various mode but I see always the same like cattura1


    1. Cattura
    2. Cattura1
    Saguaros Moderator
    #940286

    Please wait for the news from the team on this case.

    librandi Friend
    #943620

    hello, there is some notice about?
    tks

    Saguaros Moderator
    #944459

    Hi

    We’re sorry for this inconvenience as the team is working full time in new Admin template and monthly template. They will check it asap. Please stay tuned.

    Mo0nlight Moderator
    #949084

    Hi.
    The order of select box in BO is do not concern with the category article list in FO.
    if you want to sort the the result by category list.
    You can try this.
    edit the file: /templates/ja_teline_v/helper.php

    find this code:

    public static function loadCategories($catids)
        {
            $categories = array();
            foreach ($catids as $catid) {
                $cat = JTable::getInstance('category');
                $cat->load ($catid);
                if ($cat->published == 1) $categories[] = $cat;
            }
            return $categories;
        }

    around line : 479-488

    And change to this:

    public static function loadCategories($catids)
        {
            $categories = array();
            $db = JFactory::getDbo();
            $query = $db->getQuery(true);
            $query->select('id');
            $query->from('#__categories');
            $query->where('id IN ('.implode(',', $catids).')');
            $query->order('lft ASC');
            $db->setQuery($query);
            $catids = $db->loadColumn();
            foreach ($catids as $catid) {
                $cat = JTable::getInstance('category');
                $cat->load ($catid);
                if ($cat->published == 1) $categories[] = $cat;
            }
            return $categories;
        }

    lft meaning the ordering of category in BO.
    You can change "lft" to something like :
    title, id, hits, created_time, modified_time
    and ASC or DESC.

    Regards.

    Elinam21 Friend
    #955730

    I have upgraded to 1.0.9 However i still dont see how to order the categories. They reorganize themselves each time i save.

    Mo0nlight Moderator
    #956274

    Hi @francis.kisserh,

    Like I mentioned above: the order of select box in BO is not related with the category article list in FO. you just copy the custom code and then the article list will change depend on it.

    Regards.

    Elinam21 Friend
    #956493

    Seem my point is not understood.

    You say here that you have improved JA Teline V 1.0.9 with this update.

    I was expecting to see an option in the back end to select the order of categories.

    Take a look at orderBackend.png attached to this post. I want to be able to arrange the order in which categories display. Lets say i select the categories in the backend in the order
    Category 1,
    Category 2,
    Category 3,

    I want Front End to display the sections in that same order.


    1. order
    Saguaros Moderator
    #958876

    Hi Francis,

    My colleague – MoOnlight – suggested you a custom for loadCategories function so that the selected categories will show in order with credentials like: title, id, hits, created_time, modified_time
    and ASC or DESC.

    With the current selected box for multiple categories, it’s hard to order categories. I will also pass to the team again for checking this.

    Mr.Cat Moderator
    #1021135

    Hi @francis.kisserh,

    I know it’s too late, but here is another way to help you order multiple categories.

    First, open file templates/ja_teline_v/acm/news-list/tmpl/style-2.xml

    Go to line number 19 and change type="category" to type="text" ( see attachment)

    Open file templates/ja_teline_v/helper.php

    Go to line number 480 and add this code to top of scope (see attachment)

    if (!is_array($catids)) {
     $catids = explode(',', $catids);
    }

    Then back to the module config, put list category ids separated by comma in the order you want . (see attachment)

    Hope it helps

    Regards


    1. 1-13
    2. 2-5
    3. 3-3

    Wisdom is not a product of schooling but of the lifelong attempt to acquire it.

    Elinam21 Friend
    #1021379

    i got the error unexpected '=' when i tried this.

    please check and let me know

    Mr.Cat Moderator
    #1021461

    Hi @francis, Please use this patch. (attachment below)

    Extract zip file and override helper.php to /templates/ja_teline_v/

    style-2.xml to /templates/ja_teline_v/acm/news-list/tmpl/

    Or could you send me the site access information to check deeper?

    Thanks.


    1. patch.zip

    Wisdom is not a product of schooling but of the lifelong attempt to acquire it.

Viewing 15 posts - 1 through 15 (of 17 total)

This topic contains 16 replies, has 5 voices, and was last updated by  Mr.Cat 7 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum