How global search redirect to search_results.do in CMS

Ashish Kumar Ag
Kilo Guru

I want to know where the redirection is defined that Global search result in CMS will be displayed in page search_results.do

23 REPLIES 23

Hi Gurpreet,



Thanks for your replay. Somehow I have missed it.


I have added the Search results global content block in that page. However the search box in the global content block is redirecting to view_content.do , which should be search_result.do



Do i need to define the search page somewhere for the content block also.



Thanks


Ashish


Other reason for this may be form action .. it should be content_search.do



<form id="content_search" action="content_search.do" method="post" name="content_search">


Hi Gurpreet,



For me the Global search box at top right corner in CMS is working fine. It displaying the result in page search_results.do


So we have another search box in the center, from the content block (Search Results (Global)).attached


When i am searching from there its redirecting to wrong page.



Thanks a lot for your prompt response.


sd.PNG


If you use following type of code to display another search box then it will redirect you to correct page



<form id="content_search" action="content_search.do" method="post" name="content_search">


                      <g:text_search_widget size="31"/>


</form>



Its defined by the action of the form


Hi Gurpreet,



Below is the code i found from the content block and its OOB. Its calling a UI Macro "textsearch" but i couldn't found it.


Please suggest where to place your above code.



<?xml version="1.0" encoding="utf-8"?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">



  <g:evaluate var="sysparm_search">


                              var arr = new Object();


                              var sysparm_search = RP.getParameterValue('sysparm_search');


                              sysparm_search;


  </g:evaluate>


              <j:set var="jvar_cms_search_result" value="true" />


              <j:set var="jvar_ts_groupid" value="" />


              <j2:set var="sysparm_query" value="123TEXTQUERY321=${sysparm_search}" />


              <g:inline template="textsearch.xml"/>


</j:jelly>



Thanks a lot for your support.