0

i need to create something like a landing page search block (using views exposed filters) that links to a new search page. I have problems with my current set up and I am trying to avoid any code tweaks.

My current exposed block sends the results to a result page. However, the parameters are passed in the URL. instead of seeing mysite.com/results one sees mysite.com/results?taxonomy_vocabulary_3_tid=blue. How can configure so that the user only sees the main url.

Also, My search box is not showing up on the results page. Is there a way to configure so that the results page allows you to submit another search. I would think that would be a pretty standard set up.

Thanks!

  • Just as an FYI, this will have performance impacts. With parameters as GET, you can cache at the page level. With them as POST, you can't. – mpdonadio Oct 7 '14 at 15:39
1

Looks like there is a module that changes the views arguments from a GET to a POST.

Views ExPost

0

How can configure so that the user only sees the main url?

First of all, I'm not sure this is advisable. GET parameters are designed to reflect the page content and users expect that if they bookmark this page, they will get those results. If you don't like the ugly "taxonomy_vocabulary_3_tid" then you can change the machine name in the exposed form settings to something closer to reality, perhaps "?color=blue" ?

Note, if you really wanted your url to magically not have parameters, you might be able to tweak the variables the form sends as a POST variables and write a custom module that circumvents these and passes them on from Views. But this is not recommended.

Is there a way to configure so that the results page allows you to submit another search.

Sure there is. I just checked and found that this is default function of "input required" contextual filters.


Screenshot of a filter being available after a search.

And this is a result of the following settings:

Default settings for input required exposed filters

  • Hi JOsh, this works unless you are submitting to a results page. On the results page, you loose your filters – Baybook Oct 7 '14 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.