× Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

How to change frontend default sort criteria

6 năm 8 tháng trước #1766 bởi Jason Cooper
How to change frontend default sort criteria was created by Jason Cooper
Hi everyone

Could someone kindly tell me how to change the frontend default sort criteria from 'ordering' to something else, for example, 'firstname' please?

So far, I've changed the frontend model to this:


// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'firstname');
$orderDirn = $this->state->get('list.direction', 'asc');

This works but I want to make sure I've done it correctly.

Many thanks.

Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.

6 năm 7 tháng trước #1777 bởi David Vargas
Replied by David Vargas on topic How to change frontend default sort criteria
Hi, Jason!

It is totally correct, as long as the Front-End gets the ordering criteria from the Back-End.


Kind regards,

David.

Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.

Thời gian tải trang: 0.049 giây
Powered by Kunena Forum

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.