Hi there,

when using a view, one would intuitively try to change the sorting by using arguments like order=name&sort=asc. Those were copy pasted from a table display.

This doesn't work. Should it? What is the best way to do this?

The existing documentation is too old or too complex for my brain at 2:20AM.

Thanks.

Comments

esmerel’s picture

Status: Active » Fixed

In the table style, you should be able to change the settings for the fields you are using. You can make each of those fields sortable by clicking on the column title. That's probably the easiest method.

arpieb’s picture

Actually, I'm working on a sortable view that the client wants a home-rolled sort interface (instead of the obvious table column header approach - no accounting for taste). In order to accommodate them, I found that even if you don't enable click-sorting on the columns, you can use the construct above to sort the columns.

You have to determine Views' internal ID for the field value used to sort. You can snag that by looking at the Theme: Information for the Views display in question, and it will give you the full ID for the fields (e.g. a CCK text field field_name will be something like field_name_value - depends on the field type though). Use that field ID as the order argument, and you should be good to go...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.