Technote Details :: MX Site Search does not work when used with MX Includes

Issue

If I use MX Site Search and MX Includes, and I include the search form in the main page using a value for the mod URL parameter, when I submit the search query, the default page is loaded instead. In addition, the URL parameter that specifies what page to load is not passed.

Reason

This happens because the search form generated using MX Site Search uses the GET method to pass the search query (the query is passed as an URL parameter). This way, existing parameters are removed, and the correct page will not be possible to include.

Solution

To sole this issue, follow the next steps:

  1. In the same form as the text field used for the search, add a new hidden field.
  2. Configure it to have the same name as the initial URL parameter used to pass the page, and for the value, enter the URL parameter value determining the search page to load.
  3. Because the form is submitted using the GET method,the hidden field will act as the original URL parameter.

Example: if the URL parameter name is mod, and the value passed to load the search page is search, then you need to add the following code: <input type="hidden" name="mod" value="search"> to the form.

 


Home > Support > Knowledge Base > Technote Details
Search the Knowledge Base
© Adobe Systems Romania. All rights reserved.