[SOLVED] Search results not showing

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
antony_s
New Member
New Member
Posts: 8
Joined: Mon Jul 06, 2009 1:32 pm

[SOLVED] Search results not showing

Post 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?
Last edited by antony_s on Tue Jul 07, 2009 10:21 am, edited 1 time in total.
antony_s
New Member
New Member
Posts: 8
Joined: Mon Jul 06, 2009 1:32 pm

Re: Search results not showing

Post 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?
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm

Re: Search results not showing

Post 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.
antony_s
New Member
New Member
Posts: 8
Joined: Mon Jul 06, 2009 1:32 pm

Re: Search results not showing

Post by antony_s »

Brilliant! Thank you for this - works great ;D
Pierre M.

Re: [SOLVED] Search results not showing

Post 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.
replytomk3

Re: [SOLVED] Search results not showing

Post 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.
Locked

Return to “[locked] Installation, Setup and Upgrade”