Hi!
What code do I use to display the result of a search on a given site?
mrbs
Show result of a search on a given page
Re: Show result of a search on a given page
From the help of search, through "Modules -> Search -> Help":
resultpage, sets the page to open the results in.
searchtext, sets the default text in the search-box.
submit, sets the label of the search-button.
Ronny
If you create a new page, give it a name, on the options-tab, uncheck "show in menu", to make it not visible in the menu. Call that page in the calling of search,(optional) resultpage="null" - Page to display search results in.
This can either be a page alias or an id.
Used to allow search results to be displayed in a different template from the search form.
Code: Select all
{search submit="test" searchtext="" resultpage="pagename"}
searchtext, sets the default text in the search-box.
submit, sets the label of the search-button.
Ronny
-
mrbs
Re: Show result of a search on a given page
I know how to show the form, and when i submit, the right page is shown, but it doesn't show any search results. How do I tell where to submit the result??
Re: Show result of a search on a given page
The search-module "Search" just searches your own CMS site, for pages that DON'T have the "atrribute NotSearchable". Basically if you have specific text on a content page, the search should find it.
Ronny
Ronny
-
mrbs
Re: Show result of a search on a given page
Well it doesn't 
You can see it in work here:
www.caupo.dk
I understand how it works - but I imagine that I have to tell the CMS where on a specific page I want the search module to display the results... Or have I misunderstood something?
You can see it in work here:
www.caupo.dk
I understand how it works - but I imagine that I have to tell the CMS where on a specific page I want the search module to display the results... Or have I misunderstood something?
Re: Show result of a search on a given page
How do you call the search-module in your template page?
You don't have to say where you want to show the results, if you don't specify a resultpage, it replaces the content of the page you where on while requesting the search.
Ronny
You don't have to say where you want to show the results, if you don't specify a resultpage, it replaces the content of the page you where on while requesting the search.
Ronny
-
mrbs
Re: Show result of a search on a given page
In the template i call the search form like this:
{search inline="true" searchtext="" resultpage="resultat" submit="Søg"}
{search inline="true" searchtext="" resultpage="resultat" submit="Søg"}
Re: Show result of a search on a given page
Can you try what happens if you remove the "inline"-part.
Ronny
Ronny

