Add support for collections.

Since we cannot retrieve the query from collections nor override
the sort_order (try it, it really doesn't work!), the view just
sorts as configured in the collection.