Page 1 of 1

[SOLVED] Search results not showing

Posted: Mon Jul 06, 2009 1:37 pm
by antony_s
Hi,

I have made a website with a home page that is a different design to the rest of the site, and doesn't have a content section. When you use the search box, it just refreshes the page and doesn't take you to the search results page - yet this works fine on the rest of the site.

Does it just refresh the page and put the search results on the page you're currently on? That seems a bit odd - I would like it to take the user to a search results page each time - is this possible?

Re: Search results not showing

Posted: Mon Jul 06, 2009 2:21 pm
by antony_s
Perhaps I should be clearer - I have a search field at the top of every page.  Should I just have a separate Search Page?

Re: Search results not showing

Posted: Mon Jul 06, 2009 9:43 pm
by scooper
The default search action does indeed load the results into the content of the current page.
You can redirect the search results to a specifc page though using the 'resultpage' parameter.

So, for example if you create a page with an alias of 'search-results' then you can put {search resultpage="search-results"} into your template and your results will be shown in the new page.

s.

Re: Search results not showing

Posted: Tue Jul 07, 2009 10:21 am
by antony_s
Brilliant! Thank you for this - works great ;D

Re: [SOLVED] Search results not showing

Posted: Tue Jul 07, 2009 6:14 pm
by Pierre M.
Hello,

BTW, almost all tags/plugins/modules have an online help page describing their parameters. And the wiki has template samples.
Have fun with CMSms

Pierre M.

Re: [SOLVED] Search results not showing

Posted: Sun Sep 25, 2011 4:15 am
by replytomk3
Exactly what I was looking for, thanks!

So, I:
1) Created a page called "Search Results". Hide it from menu.
2) Call the module as

Code: Select all

{search resultpage="search-results"}
3) Commented out pointless "time taken" string out of results template
4) Changed settings to track phrases, and not single keywords.