Closed Luegengladiator closed 6 years ago
Where are you seeing the base types not ordered? In Recipe edit it is:
$baseTypes = $this->Recipe->BaseType->find('list', array('order' => array('name')));
Thanks for the reply. Sorry the Question was not clear enough. In "recipeLinkBox" all items are ordered by SQL-ID. I like to see it ordered alphabetic. At least the base_types. Example: I have eggs, potatoes, vegetables ordered correct because its added this way. Adding Fish now I get eggs, potatoes, vegetables, fish. Instead I want to see it eggs, fish, potatoes, vegetables
Changing Controller/RecipesController.php I'll get: Error: syntax error, unexpected '**' (T_POW) File: /var/www/html/phprecipebook/Controller/RecipesController.php Line: 173 But I think this is not .... OK See the edit now :D Please forget this Error. But that is not the solution.
Found the problem. It was pretty bad, it was pulling the entire object from the DB to get a simple list. I have fixed it up and now it orders as well.
https://github.com/nazgul26/PHPRecipebook/commit/de8fbf6b71a47440f4bcc759fe8337a3e1013750
Will be in next release or pull now.
Fix confirmed. Thanks a lot!
base_types order is by id (create order). I would like to see the the menu orderd alphabetic by name but didn't find a way to change the SQL