Hi Liuov,
I am writing a component so that users (equipment vendors) can add data into an equipment catalogue database.
Other users (buyers) will search the database - looking for the equipment that need - scrolling through all the euipment listings.
The equipment list to these buyers need to be ordered a certain way - in my case - so that a column labeld "validation rating" is ordered decending - so equipment with a higher "validation rating" is shown on top of the list.
It needs to do this by default. I realise the user can sort the list themselves - but that is not what I have been scoped to do.
So I need to display the frontend collection with speciifc column ordered as a default.
As with this post
j-cook.pro/index.php/forum/7-design-your...efault-order-in-grid there are values in the forked view - but changing these does not seem to work for me.
Looks like Morgan was having the same problem here....
www.j-cook.pro/index.php/forum/9-coding-...t-boxes-going-insane
For now, I have forked the model - but that is not a good solution - I have multiple collection views for the same table - they all seem to share the same model code.
If there isn't a feature in the wysiwyg builder, then the fork needs to be in the view. Ie: In the forked view this needs to work (but it doesn't for me)...
$model->setState('list.ordering', 'a.yourfield');
$model->setState('list.direction', 'desc');