| searchTerms |
This parameter will be set to the name attribute of the input element of your search form.
e.g. if your form contains
<input name="theseWords" type="text" />then you should include &searchTerms=`theseWords`in your snippet call (default: searchTerms i.e. looks in $_REQUEST['searchTerms']) |
|---|---|
| searchFields | Template variables to search (default: pagetitle, longtitle, introtext, content). User defined template variables can be used. |
| searchExtractChars | Maximum number of characters in extract (default: 200) |
| searchMaxDocs | Maximum number of docs to list (if unset or zero all are listed) |
| searchMinLetters | Shortest length of search terms to use (default: 3). Warning issued if shorter lengths used. |
| searchOutputList |
Output document list as unordered list (default: 1). This means that you need not insert <ul> or <li> tags in custom templates. The <ul> will have id="search-result-list" and the <li>s will have class "search-result-item"> |
| searchParents (v 1.3) | Include only parts of the document tree with these parents (the parents are included in the search) |
| searchExcludeParents (v 1.3) | Exclude parts of the document tree with these parents (the parents are also excluded from the search). Can be combined with but overrides searchParents. |
| mb_charset (v 1.3) | Database connection character set. Defaults to UTF-8 which should be fine for most MODx installations. |
| searchPaginate | Set to 1 to enable pagination (default: 0). For further details on configuring pagination if not using the default settings, see the comments at the top of the snippet. |
| searchStartTpl |
Template to output at the start.
Default as of v 1.3:
<p class="search-info"> [+search.finds+] document[+search.plural+] found containing [+search.terms+]. </p> [+search.form+] [+search.pagination+] |
| searchEndTpl | Template to output at the end.
Default:
[+search.pagination+] |
| tpl | Template for individual documents.
Default:
<h3>[+search.result_link+][+pagetitle+][+/link+]</h3> [+search.terms_found+] [+search.result_extract+] |
| searchNoResultTpl | Template to output if no results found.
Default:
<p id="search-no-results">No Results Found</p> |
| searchNoInputTpl | Template to output if no input given.
Default:
<p id="search-no-results">No search terms given.</p> |
| searchPlural | Plural character(s) for templating; applies to [+search.plural+] placeholder. (Default: 's') |