Add an article sort order menu to frontend template
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
-
- Joomla! Apprentice
- Posts: 15
- Joined: Sun Sep 09, 2012 12:50 am
- Location: Brighton, UK
- Contact:
Add an article sort order menu to frontend template
Hi
Have a design where they want to let the users change the sort order, newest to oldest etc, 4 different options.
So these orders are normal sql but how to add a form select on the website that changes order, then the page reload.
---
[Date - Newest first | Date - Oldest first | A-Z | Z-A]
Article title A
date: Aug 2
Article title B
date: Aug 6
---
It does not need to be ajax, just change the order and reload.
Have a design where they want to let the users change the sort order, newest to oldest etc, 4 different options.
So these orders are normal sql but how to add a form select on the website that changes order, then the page reload.
---
[Date - Newest first | Date - Oldest first | A-Z | Z-A]
Article title A
date: Aug 2
Article title B
date: Aug 6
---
It does not need to be ajax, just change the order and reload.
Last edited by toivo on Wed Jul 15, 2020 6:39 am, edited 1 time in total.
Reason: mod note: moved from 3.x Templates
Reason: mod note: moved from 3.x Templates
- ranwilli
- Joomla! Master
- Posts: 19203
- Joined: Sun Feb 19, 2006 6:47 pm
- Location: Toledo, OH
- Contact:
Re: Add an article sort order menu to frontend template
I think you'll have to build your own...
Have a look at Fabrik
I love using it, and I know you can do as you need with it.
Have a look at Fabrik
I love using it, and I know you can do as you need with it.
Last edited by toivo on Tue Jul 14, 2020 5:39 am, edited 1 time in total.
Reason: mod note: changed URL to point to JED
Reason: mod note: changed URL to point to JED
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com
Stay ON the update path.
https://harpervance.com
-
- Joomla! Apprentice
- Posts: 15
- Joined: Sun Sep 09, 2012 12:50 am
- Location: Brighton, UK
- Contact:
Re: Add an article sort order menu to frontend template
Seems I might need to build one, just was hoping to find a similar component.
You can do column sorting on a List articles layout, so see if I can base some on that.
You can do column sorting on a List articles layout, so see if I can base some on that.
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Add an article sort order menu to frontend template
One way—not necessarily the "neatest" workaround—is to have four menu items:
1) Newest to oldest
2) Oldest to newest
3) Alphabetical A-Z
4) Alphabetical Z-A
Have the first menu item as the "default" in your main site menu (with the other three items hidden).
Create a module to appear on your 'blog pages—I assume that's the kind of layout you're interested in—with links to all four menu items and display the module on these pages in such a way as people will find it.
I might try this idea out myself on a test site.
As you say, the list layout style has the ability to do this, if you're only interested in displaying a list of articles.
1) Newest to oldest
2) Oldest to newest
3) Alphabetical A-Z
4) Alphabetical Z-A
Have the first menu item as the "default" in your main site menu (with the other three items hidden).
Create a module to appear on your 'blog pages—I assume that's the kind of layout you're interested in—with links to all four menu items and display the module on these pages in such a way as people will find it.
I might try this idea out myself on a test site.
As you say, the list layout style has the ability to do this, if you're only interested in displaying a list of articles.
- Per Yngve Berg
- Joomla! Master
- Posts: 30930
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
- ranwilli
- Joomla! Master
- Posts: 19203
- Joined: Sun Feb 19, 2006 6:47 pm
- Location: Toledo, OH
- Contact:
Re: Add an article sort order menu to frontend template
Come on, you guys! My solution was waaaaaay harder and more complicated than those you’ve proposed.
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com
Stay ON the update path.
https://harpervance.com
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Add an article sort order menu to frontend template
@ranwilli
@tristanbailey: here's the simplest solution:
Create four menu items like I've shown in the following screenshot:
See it in operation here: https://j3xdemo.enduring.com.au/
Took me 5 minutes to put it together.
@tristanbailey: here's the simplest solution:
Create four menu items like I've shown in the following screenshot:
See it in operation here: https://j3xdemo.enduring.com.au/
Took me 5 minutes to put it together.
You do not have the required permissions to view the files attached to this post.
- AlexVega
- Joomla! Hero
- Posts: 2711
- Joined: Fri Aug 28, 2015 6:13 am
- Location: México
Re: Add an article sort order menu to frontend template
sozzled wrote: ↑Tue Jul 14, 2020 7:27 pmOne way—not necessarily the "neatest" workaround—is to have four menu items:
1) Newest to oldest
2) Oldest to newest
3) Alphabetical A-Z
4) Alphabetical Z-A
Have the first menu item as the "default" in your main site menu (with the other three items hidden).
Create a module to appear on your 'blog pages—I assume that's the kind of layout you're interested in—with links to all four menu items and display the module on these pages in such a way as people will find it.
I might try this idea out myself on a test site. ;)
As you say, the list layout style has the ability to do this, if you're only interested in displaying a list of articles.
+ 1
Very creative, simple and ready from the core solution @sozzled.