Quote

We're also available for Custom Joomla Development

Hire us now

Sorting related articles

Hi, is it possible to add an option: Order: Recently created last?

I use Joomla articles to "simulate" a calendar for motorsport events. The blog-view is ordered by created date which works well to show the next upcoming event first (see attachment).

The related articles module is used to show other articles for the selected location. But the order is in the opposite direction.

Please help :-)
Resolved
The discussion has been resolved.

Accepted Answer

  • Replied by admin on Wednesday, February 15 2017, 03:03 PM
    Hi, I haven't tested it but you can try this :
    Please open this file : ../modules/mod_relateditems_xtd/helper.php at lines 318 - 324 you will see this :
    //ordering option
    						switch($ordering) {
    							case 0: default: $orderby = "a.created DESC" ; break;
    							case 1: $orderby  = "a.hits DESC"; break;
    							case 2: $orderby  = "a.ordering DESC"; break;
    							case 3: $orderby  = "RAND()"; break;
    						}

    try to change it to :

    //ordering option
    						switch($ordering) {
    							case 0: default: $orderby = "a.created ASC" ; break;
    							case 1: $orderby  = "a.hits DESC"; break;
    							case 2: $orderby  = "a.ordering DESC"; break;
    							case 3: $orderby  = "RAND()"; break;
    						}

    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
     
  • Replied by admin on Saturday, February 18 2017, 01:42 PM · Hide· #1
    Hi, Please open the file ../modules/mod_relateditems_xtd/tmpl/default.php at lines 221 you will see this code :
    <h5 property="genre" class="cat"><?php echo JText::_('MORE_ARTICLES'); ?></h5>

    You can simply delete it.
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by Kroketto on Thursday, February 16 2017, 09:43 AM · Hide· #2
    Yes, it is the only module I use in this position.
  •  
  • Replied by admin on Thursday, February 16 2017, 09:09 AM · Hide· #3
    Hi, sorry but do you use Related Item Extended module or something else? Because Related Item Extended doesn't have that "More articles" wording
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by Kroketto on Thursday, February 16 2017, 07:57 AM · Hide· #4
    I found it. The same code appears at line 169 - 175. I changed it there and now it works.

    One last question, how can I hide the caption "More articles"? I don't find any option for it.
  •  
  • Replied by admin on Thursday, February 16 2017, 02:40 AM · Hide· #5
    Hi, are you sure? the code purpose is about to change the direction. Could you let me know the URL of your site so I can take a look?
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  •  
    Replied by Kroketto on Wednesday, February 15 2017, 05:58 PM · Hide· #6
    Thanks for the quick response but unfortunately it doesn't help.
Your Response
Please login first in order for you to submit comments