The custom Velocity template for the query uses the JCR (Java Content Repository, JSR 283) programming model. The SiteVision API is available here

Example query: find 'my pages', as defined by the user metadata named 'responsible'
| Name | Type and Description |
|---|---|
| portlet | javax.jcr.Node |
| This portlet. See properties below | |
| sitevisionUtils | senselogic.sitevision.api.Utils |
| The main entry point to all utility classes | |
| jcrSession | javax.jcr.Session |
| The JCR Session | |
| request | javax.portlet.PortletRequest |
| The portlet request |
Note! For best performance - don't refer/use the $portlet reference if you can avoid it. Creating the portlet Node is a potential expensive operation and will only be added if detected in your Velocity template code.
| Name | Type and Description | |
|---|---|---|
| Querying | ||
| predefinedSearchQuery | javax.jcr.PropertyType.STRING | |
| The search query expression | ||
| evaluatePredefinedSearchQuery | javax.jcr.PropertyType.BOOLEAN | |
| Whether predefinedSearchQuery should be evaluated via Velocity or not | ||
| Type restrictions | ||
| includeFiles | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to include files in the search result | ||
| includeImages | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to include images in the search result | ||
| includePages | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to include pages in the search result | ||
| includeArticles | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to include articles in the search result | ||
| includeStructurePages | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to include structure pages in the search result | ||
| No hits / Search failed | ||
| showSearchError | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to show search errors or no hits messages | ||
| errorMessage | javax.jcr.PropertyType.STRING | |
| An i18n:ized message describing why search could not be executed | ||
| searchErrorFont | javax.jcr.PropertyType.WEAKREFERENCE | |
| The search error font Node (sv:font) | ||
| Index fields | ||
| summaryField | javax.jcr.PropertyType.STRING | |
| Name of the summary field | ||
| titleField | javax.jcr.PropertyType.STRING | |
| Name of the title field | ||
| nameField | javax.jcr.PropertyType.STRING | |
| Name of the name field | ||
| namepathField | javax.jcr.PropertyType.STRING | |
| Name of the name path field | ||
| urlField | javax.jcr.PropertyType.STRING | |
| Name of the absolute URL field | ||
| uriField | javax.jcr.PropertyType.STRING | |
| Name of the relative URL field | ||
| lastPublishedField | javax.jcr.PropertyType.STRING | |
| Name of the last published field | ||
| sizeField | javax.jcr.PropertyType.STRING | |
| Name of the size field | ||
| siteField | javax.jcr.PropertyType.STRING | |
| Name of the site field | ||
| mimetypeField | javax.jcr.PropertyType.STRING | |
| Name of the mime type field | ||
| Hit count | ||
| useMaxSearchHits | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to limit number of search hits | ||
| maxSearchHits | javax.jcr.PropertyType.LONG | |
| Maximum number of search hits | ||
| Search hits | ||
| showSearchHitNumbering | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not search hits should be displayed numbered | ||
| showFileIcons | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not a file icons should be displayed for each search hit | ||
| useSearchHitBackgroundColor | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not a searchHitBackgroundColor (see line below) are in use | ||
| searchHitBackgroundColor | javax.jcr.PropertyType.WEAKREFERENCE | |
| The background color for every odd search hit (sv:color) | ||
| headingField | javax.jcr.PropertyType.STRING | |
| What field to fetch the heading text from ("nameField" or "titleField", see Index fields section above) | ||
| searchHitHeadingFont | javax.jcr.PropertyType.WEAKREFERENCE | |
| The hit heading font Node (sv:font) | ||
| showSearchHitExcerpt | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to show hit excerpts | ||
| searchHitExcerptFont | javax.jcr.PropertyType.WEAKREFERENCE | |
| The hit excerpt font Node (sv:font) | ||
| searchHitExcerptLength | javax.jcr.PropertyType.LONG | |
| Approximate length (char count) for search hit excerpts | ||
| showSearchHitInfo | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to show hit info (date + size) | ||
| searchHitInfoFont | javax.jcr.PropertyType.WEAKREFERENCE | |
| The hit info font Node (sv:font) | ||
| showSearchHitPath | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to show a linked path to the search hit | ||
| searchHitPathFont | javax.jcr.PropertyType.WEAKREFERENCE | |
| The hit path font Node (sv:font) | ||
| Misc | ||
| useCustomSortFields | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not to use custom sort fields (i.e. use a custom "relevance" sorting") | ||
| useCustomIndex | javax.jcr.PropertyType.BOOLEAN | |
| Whether or not a custom index is used | ||
| Aggregated portlet preferences/settings: | ||
| templates | javax.jcr.PropertyType.WEAKREFERENCE | |
| A temporary Node holding all sub-templates used by the main template. See available properties in table below | ||
| bundle | javax.jcr.PropertyType.WEAKREFERENCE | |
| A temporary Node holding all i18n:ized texts used for output. See available properties in table below |
Sidan uppdaterad:
Nästa generations publiceringsverktyg är här!