@andresbrahma08
Ok, like i already expected.
I will explain what you want.
Your aim should be to place a SEARCH into your HEADER. Why into the HEADER ? —> Because you can FIX your HEADER. It will always stay on TOP of your SITE.
But your results will be on your DYNAMIC-PAGE and your dynamic-page will be scrollable . In this case you will have the advantage to have a NOT -SCROLLABLE-HEADER . And a second advantage would be —> you do NOT have to switch between pages anymore.
You have your SEARCH on the top of your page and you will get shown your results directly under the HEADER-Section .
This should be your aim!
How to achieve such an functionality?
Add a STRIP into your HEADER . Be sure that the strip is surely added to the HEADER-SECTION . How to be sure? When the strip is attached to the header, it will become —> ORANGE !
After you have added a strip to your header, you can add a —> MULTISTATE-BOX , into the new HEADER-STRIP .
Why you add a STRIP to the header? Strips are RESPONSIVE and can be hidden and shown if not needed. You can add several STRIPS into Header, but if you have a MULTI-STATE-BOX in your header, than you normaly need just 1-STRIP.
Why adding a MULTI-STATE-BOX to your header?
Because you will get the ability to switch between different STATES inside the MSB. You surely want to add more to your header than just the seachr-bar.
OK! After you have done your new SETUP, what next?
Now comes the coding!
As i already said before, you will need to get the INPUT-VALUES in your HEADER and transfer them to your DYNAMIC-PAGE, where you will do the FILTERING-PROCESS.
For this you will need —> Wix-Storage!
Choose one of the given options here… (session / local…and so on)
https://www.wix.com/velo/reference/wix-storage
After you have selected some items inside your dropdowns you save selected values into Wix-Storage.
OK! Values saved into Wix-Storage, what next?
You will also need a REDIRECTION to your DYNAMIC-PAGE (ALL), after clicking onto the SEARCH-button.
Use → Wix-Location for this… ( wixLocation.to()
https://www.wix.com/velo/reference/wix-location
Now you are able to be redirected to your dynamic-page.
On the dynamic page an automatic Search-Process will be activated inside the —> onReady-Section.
You have already the code for the searching-process, all you will have to do are 5-steps.
- Get values of the dropdowns and inputs of your header.
- Save them into Wix-Storage.
- Redirect to your dynamic-page(all).
- Read the data out of Wix-Storage and put it into your Search-Function.
- Search-Function should be starting automaticaly when page is ready!
You are done! That was easy, wasn’t it?