×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
How to change frontend default sort criteria
Jason Cooper
New Member
Posts: 1
6 år 8 måneder siden #1766
af Jason Cooper
How to change frontend default sort criteria blev oprettet af 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.
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.
Venligst Log på eller Opret en konto for at deltage i samtalen
David Vargas
New Member
Posts: 17
6 år 7 måneder siden #1777
af David Vargas
Besvaret af David Vargas på emne 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.
It is totally correct, as long as the Front-End gets the ordering criteria from the Back-End.
Kind regards,
David.
Venligst Log på eller Opret en konto for at deltage i samtalen
Tid til at oprette siden: 0.052 sekunder