Question: Is there a way to choose the order of items that are in a drop-down menu that is retrieving its items from a collection? I’m using the regular Wix Editor for this one.
Background: I have a drop-down menu that lists membership options for different age groups of people doing kickboxing classes. The age options are Kids, Youth, Teens, Adults. I want them to list exactly like this < in order of age, from youngest to oldest.
The drop-down menu is connected to tags in my collection and by default it creates the drop down list in alphabetical order (ie. displays the options as: All, Adults, Kids, Teens, Youth). I am looking for a way to tell the dropdown to sort them differently.
The way I have done it so far is to use the no-code option, that seems to have recently been added to Wix Editor (I don’t think you could filter repeater items using a dropdown without code until the last year or so as I’m sure I tried it in the past…?)
I also tried using Velo to connect the dropdown to the CMS. This worked better, in a way, because if you do it the Velo way, the dropdown list remains an independent item with item names and values being different and you can drag the ‘items’ in the drop-down list into any order you want. HOWEVER with the Velo solution I was experiencing problems in that my CMS items (kickboxing memberships for kids, youth, teens and adults) are also sorted into packages - bronze, silver, gold, platinum, and the sort order of those items displaying in the repeater messed up when the Velo enabled filter was applied.
So - My question is still - using the standard method to connect a dropdown list to filter a CMS repeater - can I change the order of the items in the drop-down list, when it is connected to tags in my collection??
Thank you!
You describe a lot, but not effectively and to long. You should do it more in a SUMMARY-MANNER. —> Just mentioning the most important things of your SETUP.
My Setup:
- 1x dropdown (ID: …)
- dropdown is connected by (dataset) to my DATABASE (ID:…)
- dropdow has following function…
- dropdown has a setted-up filter-option from my propertes panel (filter)
- dropdown has also a sort function → also setted-up inside of my property-panel of my dataset.
- and so on…
7) WHAT ABOUT THE CODE YOU ARE USING? – >where is it ?
Some detailed summary of your setup like that, would maybe not explain what your goal is, but it would show clearly your setup, much better.
The drop-down menu is connected to tags in my collection and by default it creates the drop down list in alphabetical order (ie. displays the options as: All, Adults, Kids, Teens, Youth). I am looking for a way to tell the dropdown to sort them differently.
What about some screenshots → which would make your setup even more detailed and clear.
You are also talking about…
using the standard method to connect a dropdown list to filter a CMS
What is the standard? → DATASET-WAY ?
…and about …
Velo enabled filter
What is the velo enabled filter?
When you describe → please make sure that you define your sentences clearly to the logic and structure of your setup, each little detail will play a role.
Thanks for your reply and I appreciate you trying to help me.
I have a ‘creative mind’ rather than a ‘technical mind’ so it is not natural for me but I will try!..
On the page I have:
A repeater, set to display content from a collection
A dropdown, set to filter content in the repeater, according to the Tags field
My tags are membership types, listed as age group/type (Kids, Teens, Adults, etc)
I would like the list in the dropdown to appear in AGE order.
The default, it seems, is ALPHABETICAL order.
How do I achieve this please?
Due to my dropdown items being linked to the collection, I do not get the option to re-organise the list of items in the dropdown settings.
Since you use a dataset, which manages your dropdown (right?), then i would say to take a look onto the property-panel of your dataset which is connected to your dropdown.
There you should find SORT-OPTIONS.
But if you want to go a more dynamic way and generate it by code, maybe this post can give you some ideas…
Surely there are more examples out there to be found in the SEARCH of this forum.
I would have to take a look directly onto your setup to give you more advice, or even solve your problem.
CODE is directly visible, but your setup is only partially visible for me.
Hey! Did you ever figure this out? A workaround maybe?