JoomEXT:EventList
From Kb_JMY(晉明夷)
JoomEXT:EventList
How to change the default sorting field?
- com_eventlist_1.0.1_schlu.zip
- Joomla_1.5.15-Stable-Full_Package.zip
- Ans: The following files need to be modified:
- public_html/Joomla/components/com_eventlist/views/eventlist/view.html.php
- public_html/Joomla/components/com_eventlist/models/eventlist.php
- views/eventlist/view.html.php
* Change the marking on which field is sorted, from 'a.dates' to 'l.city'
-> One Location need to changed:
-> 1. function _buildSortLists() ---------- arroun line#183
-> Original line is:
$filter_order = JRequest::getCmd('filter_order', 'a.dates');
-> Change 'a.dates' to 'l.city'
$filter_order = JRequest::getCmd('filter_order', 'l.city');
|
- models/eventlist.php
* Change default sorting field from 'a.dates' to 'l.city'
-> Two functions need to changed
-> 1. function __construct() --------------- Arround Line#79: change 'a.dates' to 'l.city'
$this->setState('filter_order', JRequest::getCmd('filter_order', 'a.dates'));
-> 2. function _buildEventListOrderBy() ---- Around Line#196: change 'a.dates' to 'l.city'
$orderby = ' ORDER BY '.$filter_order.' '.$filter_order_dir.', a.dates, a.times';
|

