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 :-)
7 years 10 months ago #1 by Felix Aretz

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5263) Offline
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;
						}
7 years 10 months ago #2 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Thanks for the quick response but unfortunately it doesn't help.
7 years 10 months ago #3 by Felix Aretz

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5263) Offline
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?
7 years 10 months ago #4 by TemplatePlazza

Please Log in or Create an account to join the conversation.

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.
7 years 10 months ago #5 by Felix Aretz

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5263) Offline
Hi, sorry but do you use Related Item Extended module or something else? Because Related Item Extended doesn't have that "More articles" wording
7 years 10 months ago #6 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum