Support the development of TastyIgniter Learn more
Hi , is not that strange?
How are the menu items ordered? Not based on id in database?
Here for example I don’t understand what logic follows.
As you can see the numbers are not in ascending order, instead in all the rest of the menu it is ordered correctly.
Thanks a lot
The order is controlled by the priority field in the admin panel
Sorry I don’t get it. Could you explain better? 🙂
I have priority only in the cathegory?
You can order the items using the priority field. It should be there in menu items as well as categories. Enter 1 for the item you want to be first, 2 for second, 3 for third etc…
Yes clear thanks. But if I have all to 0, I mean. Why is ordered in this way? I never setted the priority. Where is stored in the db ?
under price on the right
Do you maybe have an explanation of why this happens? If it has all priority 0 are not sorted by id in the database?
fedex The explanation from ryanmitchell is on point and I have nothing else to add except that if you have the priority for all your menu items set to 0 then MySQL default sorting order is used (i have no idea how that works).
If you look at extensions/igniter/local/components/menu.php around line 81 you can see it calls listFrontEnd in /admin/models/menus_model.php with the sort params.
The default is menu_priority, so if they are all the same then the database engine is making up the order from there.
Ok, thanks all. I will look deeper