Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sortable by count ManyToMany relations #817

Open
ArmandArthur opened this issue Dec 7, 2024 · 0 comments
Open

Sortable by count ManyToMany relations #817

ArmandArthur opened this issue Dec 7, 2024 · 0 comments

Comments

@ArmandArthur
Copy link

ArmandArthur commented Dec 7, 2024

I have a command's list relate to many products.
I display in a column the number of products.

How sort on this number?

<td {% if commandes.isSorted('count(r.commandProducts)') %} class="sorted"{% endif %}> {{ knp_pagination_sortable(commands, 'Number products', 'count(r.commandProducts)') }} </td>

Or there exist an other way?

@garak garak added the Help user label Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants