Skip to content

Instantly share code, notes, and snippets.

@rtripault
Created November 10, 2010 14:12
Show Gist options
  • Save rtripault/670891 to your computer and use it in GitHub Desktop.
Save rtripault/670891 to your computer and use it in GitHub Desktop.
SimpleSearch parameters (MODx Revolution)
[[simpleSearch?
&tpl=`SearchResult`
//The chunk that will be used to display the contents of each search result.
&containerTpl=`SearchResults`
//The chunk that will be used to wrap all the search results, pagination and message.
&useAllWords=`0`
//If true, will only find results with all the specified search words.
&maxWords=`7`
//The maximum number of words to include in the search. Only applicable if useAllWords is off.
&searchStyle=`partial`
//To search either with a 'partial' LIKE search, or a relevance-based 'match' search.
&perPage=`10`
//The number of search results to show per page.
&showExtract=`1`
//Whether or not to show an extract of the content of each search result.
&extractLength=`200`
//The number of characters for the content extraction of each search result.
&extractEllipsis=`…`
//The string used to wrap extract results with. Defaults to an ellipsis.
&highlightResults=`1`
//Whether or not to highlight the search term in results.
&highlightClass=`sisea-highlight`
//The CSS class name to add to highlighted terms in results.
&highlightTag=`span`
//The html tag to wrap the highlighted term with in search results.
&pageTpl=`PageLink`
//The chunk to use for a pagination link.
&currentPageTpl=``
//The chunk to use for the current pagination link.
&pagingSeparator=`CurrentPageLink`
//The separator to use between pagination links. |
&ids=``
//A comma-separated list of IDs to restrict the search to.
&idType=`parents`
//The type of restriction for the ids parameter. If parents, will add all the children of the IDs in the ids parameter to the search. If documents, will only use the specified IDs in the search.
&depth=`10`
//If idtype is set to parents, the depth down the Resource tree that will be searched with the specified IDs.
&hideMenu=`2`
//Whether or not to return Resources that have hidemenu on. 0 shows only visible Resources, 1 shows only hidden Resources, 2 shows both.
&contexts=``
//The contexts to search. Defaults to the current context if none are explicitly specified.
&searchIndex=`search`
//The name of the REQUEST parameter that the search will use.
&offsetIndex=`sisea_offset`
//The name of the REQUEST parameter to use for the pagination offset.
&toPlaceholder=``
//Whether to set the output to directly return, or set to a placeholder with this propertys name.
]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment