Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • anderatc Friend
    #194755

    Hello, this is my problem. I working local.
    JA Accordion version 2.5.3 I do not get the order I want. The starting point is article name 5 april, april 12 19 April, 10May 17 May, 24 May, 31 May and respetivelijk ID’s 310,311,312,313,314,315,316. Both choice type product ID or Category give the same problems. The all choices ordering no solution.
    Articles also tried everything, creation date, order.
    How can I fix that order is correct.
    Thanks and regards, Andre


    1. accordion1
    Ninja Lead Moderator
    #522669

    This a bug of module and I have raised this bug to development team here, they will check and reply for you soon

    Thanh Nguyen Viet Friend
    #523147

    @anderatc,

    The current version of JA Accordion Module does not have option to order by Article title.
    To add this feature to your site, please apply the following tweak:

    1. Open the file: modules/mod_jaaccordion/mod_jaaccordion.xml

    Replace:
    <field name=”ordering”
    type=”list”
    default=”published”
    label=”FIELD_ORDERING_LABEL”
    description=”FIELD_ORDERING_DESC”>
    <option value=”c_dsc”>VALUE_RECENT_ADDED</option>
    <option value=”m_dsc”>VALUE_RECENT_MODIFIED</option>
    <option value=”p_dsc”>VALUE_RECENT_PUBLISHED</option>
    <option value=”mc_dsc”>VALUE_RECENT_TOUCHED</option>
    </field>

    With:
    <field name=”ordering”
    type=”list”
    default=”published”
    label=”FIELD_ORDERING_LABEL”
    description=”FIELD_ORDERING_DESC”>
    <option value=”c_dsc”>VALUE_RECENT_ADDED</option>
    <option value=”m_dsc”>VALUE_RECENT_MODIFIED</option>
    <option value=”p_dsc”>VALUE_RECENT_PUBLISHED</option>
    <option value=”mc_dsc”>VALUE_RECENT_TOUCHED</option>
    <option value=”title”>Title</option>
    </field>
    <field name=”direction”
    type=”list”
    default=”desc”
    label=”Direction”
    description=”Select a direction”>
    <option value=”desc”>Descending</option>
    <option value=”asc”>Ascending</option>
    </field>

    2. Open the file: modules/mod_jaaccordion/helpers/adapter/content.php

    Replace:
    [PHP]// Set ordering
    $order_map = array(‘m_dsc’ => ‘a.modified DESC, a.created’, ‘mc_dsc’ => ‘CASE WHEN (a.modified = ‘ . $db->quote($db->getNullDate()) . ‘) THEN a.created ELSE a.modified END’, ‘c_dsc’ => ‘a.created’, ‘p_dsc’ => ‘a.publish_up’);
    $ordering = JArrayHelper::getValue($order_map, $params->get(‘ordering’), ‘a.publish_up’);
    $dir = ‘DESC’;
    [/PHP]
    With:

    [PHP] // Set ordering
    $order_map = array(‘m_dsc’ => ‘a.modified DESC, a.created’, ‘mc_dsc’ => ‘CASE WHEN (a.modified = ‘ . $db->quote($db->getNullDate()) . ‘) THEN a.created ELSE a.modified END’, ‘c_dsc’ => ‘a.created’, ‘p_dsc’ => ‘a.publish_up’, ‘title’ => ‘a.title’);
    $ordering = JArrayHelper::getValue($order_map, $params->get(‘ordering’), ‘a.publish_up’);
    $dir = $params->get(‘direction’, ‘DESC’);[/PHP]

    3. Once done, you can see the new option under Ordering setting in module setting form to order by Title, and the new setting for “Direction”.

    Hope it helps.

    anderatc Friend
    #523764

    ok Thanks voor your replay. I use this possibility.
    Regards

    Mall Friend
    #533961

    @anderatc,

    For your information, current version of Ja Accordion( 2.5.7) has supported ordering by title.

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

This topic contains 5 replies, has 4 voices, and was last updated by  Mall 10 years, 6 months ago.

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