This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 131
Order tags alphabetically #246
Labels
Comments
👍 |
👍 , but I'm not so familar with the NewsBundle anyone willing to provide a PR? |
Actually I would solve this issue at the Admin level. I wouldn't add this ordering right into the Entity. AFAIK you can create custom queries in the admin form mapper (even for relations). Tags should be sorted there in a custom query. |
I would solve this on Entity-Level because you want the same ordering in the frontend, right? |
Not necessarily. For example you could order tags by the highest number of posts under a specific tag. Or most popular tag based on views. Personally I think that the less logic in entities, the better it is. |
Let’s keep it like it is |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I can't seem to find a way to order the tags in the select2 dropdown. I would like to use doctrines order-by mappin, like this.
I tried using the association override in my easyextended newsbundle like this:
but it doesnt work, I get the following error.
I suspect it is becouse of the mapping being done in the dependencyinjector but Im not sure in what order the different configurations are used.
Anyway I suppose ordering by name should be the default, maybe it could be done from sonata admin or via javascript but it seems logical to me that ordering by name would be the default.
The text was updated successfully, but these errors were encountered: