Search API
Also see the Search Overview.
Seach covers the following modules:
- Sermons
- Articles
- Events
- Products
- Members
- Blogs
- Pages
Display Mode: Box
Show
There are no show tags that modify how the search form is layed out. A form is auto generated which will link to the search results.
Parameters
number
Used to include a second search form on a template. Currently there is a limit of two search forms per page, number:3 will not work.
Example:
"number:2",
Display Mode: Results
Ther is no getContent needed to display the search results. By default the form will send users to /search-results/ which will use the default page template and display the results through the normal Page getContent.
A getContent can be used however, to deliver customize results. If no show tags are used a default layout will be used.
Show
Show
| Tag | Description |
|---|---|
| __title__ | The title of the itme |
| __titlelink__ | A preformatted link to the itme |
| __slug__ |
The slug of the item |
| __url__ | An absolute path to the item |
| __type__ | The module of the item |
| __author__ | Where applicable, the author of the item |
| __summary__ | Where applicable, the summary of the item |
| __description__ | The full text of the item |
| __preview__ | A shortened version of the text. HTML is stripped. Defaults to be no more than 250 characters. Can be specified with __perview limit='120'__ Uses the description if no summary is available. |
| __tags__ | Where applicable, comma separated list of tags for the item |
| __groups__ | A list of groups the content is assigned to |
before_show, after_show, no_show
no_show will be used if no results are returned.
| Tag | Description |
|---|---|
| __term__ | The search term that was used |
| __resultsnumber__ | The total number of results returned |
| __pagination__ |
Divides the records into smaller groups and provides links to navigate through them |
Parameters
keywords
If the querystring has 'keywords' in it, this parameter does not need to be included. If this parameter is used, it will override the search term in the querystring.
Example:
"keywords:conference",hide_module
By default all possible modules are included in the search results. This parameter will remove specified modules from the results.
Example:
"hide_module:media,blogs",
find_module
This is the opposite of hide_module. Will only find results in specified modules.
Example:
"find_module:articles,events",
find_group
Only show items assigned to that group Uses group slugs.
Example:
"find_group:group-slug",
match
Specified what will be searched in each module. Right now the only options are 'all' (default) and 'tags'.
Example:
"match:tags",
howmany
Sets the maximum number of items to display
Example:
"howmany:3",
debug
Will return some info to help debug what is happening with the api call.
Example:
"debug:yes",
order
Specifies the order of the results. 'score' is the default and will return results bases on relevance. 'module' will order the results by their module (Articles would be first, blogs second etc).
Example:
"order:module",
groupby
Will group the results. The only current option is 'module'.
Example:
"groupby:module",