Answer the question
In order to leave comments, you need to log in
How to sort by city in MODX?
Hello.
I’ll make a reservation right away, I’m working with MODX for the first time, so I don’t know fashionable modules, as well as a lot in this CMF.
The crux of the matter . You need to make an accordion with addresses of stores sorted by city.
Example:
Clicking on a city opens a list of addresses.
As I understand it, to solve this problem, you need to make two tables
1. Cities
2. Addresses
And display table 2 sorted from table 1.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
It's not entirely clear what the question is about MODs ...
If there are 2 levels and the content rarely changes, then you can create a two-dimensional array and take data from it.
If often, then again, depending on the number of cities and shops, you can have two tables, you can use one and select an array.
Accordion - should it open on reload or on hover? It’s more a question of how it is organized on the site, as an option, transfer the same array to JS.
PS: Asking the right question greatly improves the answer! ;)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question