-
AuthorPosts
-
February 13, 2014 at 3:50 pm #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
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
Thanh Nguyen Viet FriendThanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
February 18, 2014 at 7:55 am #523147The 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.
February 21, 2014 at 12:23 pm #523764ok Thanks voor your replay. I use this possibility.
RegardsMall FriendMall
- Join date:
- September 2014
- Posts:
- 82
- Downloads:
- 0
- Uploads:
- 9
- Thanked:
- 24 times in 23 posts
AuthorPostsViewing 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
Ordering JA Accordion
Viewing 5 posts - 1 through 5 (of 5 total)