i'm facing a problem - i've got a view with exposed filter and exposed sorting
but i also have a custom sorting (draggableviews weight), which isn't and can't be made exposed.
what i need is to use draggableviews sort as default - before user applies exposed sort order. but whatever i've tried, only exposed sorting is respected.
i've tried setting $form_state['input']['sort_by']='weight' in the hook_form_alter but then the view throws an error with no results.
can someone please point me in the right direction. thanks.
ps: i also created an issue in the draggableviews http://drupal.org/node/1813746
Comments
Comment #1
stockliasteroid commentedI have a similar issue, only not with draggableviews, so I wonder if this is a Views issue.
I have a node type that has price, title, and type fields, and I'm sorting by type first (which is NOT exposed), and then by price and title, which ARE exposed. No matter what I choose for the default for the exposed filters it always takes the ASC from the type field, so my listings are always sorted by price ASC, even though I set the default for the price exposed filter to be DESC.
If I remove the sort on type (the one that's not exposed) the sort works as I would expect it to, defaulting to price DESC. So it seems like the non-exposed sort's direction is applied to subsequent exposed sorts, regardless of the default selected on the exposed sort.
Anyone have any ideas?
Comment #2
stockliasteroid commentedThis may be related: #666870: Exposed sorts do not properly default
Comment #2.0
stockliasteroid commentedcorrections
Comment #3
fernly commentedThis is more a draggableviews issue. If found a solution to this and posted it here: https://drupal.org/node/1813746#comment-8506599
Comment #4
mustanggb commentedComment #5
mustanggb commented