I have a view with an exposed filter using the hierarchical select module for taxonomy.
/browse?category=12345
On the same view, I have an argument which does the same thing.
/browse/12345
I want my users to navigate using only the select filter, but this doesn't support breadcrumbs and page titles like the argument does. I wrote a bit of code to inject the filter value into the argument, and that works fine, but the next time I change a filter and refresh the view, the URL changes to that previous value while showing the new value.
/browse/(term id of last selection)?category=(term id of new selection)
aka
/browse/111?category=333
How can I discard this url change and keep things how they work the first time?
function MODULE_views_pre_view(&$view, &$display_id, &$args) {
switch ($view->name) {
case 'resources':
if ($display_id == 'page_1') {
if ($_GET['category']) {
$args = array($_GET['category']);
}
}
break;
}
}