Search field portlet

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

Elements available in the Velocity Context
NameType and Description
requestjavax.portlet.PortletRequest
 The portlet request
portletjavax.jcr.Node
 This portlet. See available properties in table below
jcrSessionjavax.jcr.Session
 The JCR Session
sitevisionUtilssenselogic.sitevision.api.Utils
 The main entry point to all utility classes
velocityEvaluatorsenselogic.sitevision.api.render.velocity.VelocityEvaluator
 A evaluator that can parse Velocity templates or Velocity expressions on the fly
Additional properties available for the portlet element ($portlet)
NameType and Description 
 Search form 
searchFieldSizejavax.jcr.PropertyType.LONG 
 The size of the search form input field 
searchFieldFontjavax.jcr.PropertyType.WEAKREFERENCE 
 The search field font Node (sv:font) 
useTextSearchButtonjavax.jcr.PropertyType.BOOLEAN 
 Whether to use a text button or not (i.e. an image button) 
searchButtonTextjavax.jcr.PropertyType.STRING 
 The i18n:ized search button text (en: "Search") 
searchButtonFontjavax.jcr.PropertyType.WEAKREFERENCE 
 The search button Node (sv:font) 
searchButtonImagejavax.jcr.PropertyType.WEAKREFERENCE 
 The search button image Node (sv:image) 
   
 Auto complete suggestions 
useAutoSuggestionsjavax.jcr.PropertyType.BOOLEAN 
 Whether or not to use auto complete suggestions 
maxAutoSuggestionsjavax.jcr.PropertyType.LONG 
 Max number of autocomplete suggestions 
autoCompleteURLjavax.jcr.PropertyType.STRING 
 The autocomplete suggestion URL to use in Ajax calls 
autocompleteFieldjavax.jcr.PropertyType.STRING 
 What index field to use when extracting auto complete suggestions ("nameField" or "titleField", se Index fields section below) 
   
 Querying 
queryParameterjavax.jcr.PropertyType.STRING 
 The name of the parameter to use when submitting a query 
searchFormTargetPagejavax.jcr.PropertyType.WEAKREFERENCE 
 The Node (typically a sv:page) rendering all templates for a search result 
   
 Type restrictions 
includeFilesjavax.jcr.PropertyType.BOOLEAN 
 Whether or not to include files in the search result 
includeImagesjavax.jcr.PropertyType.BOOLEAN 
 Whether or not to include images in the search result 
includePagesjavax.jcr.PropertyType.BOOLEAN 
 Whether or not to include pages in the search result 
includeArticlesjavax.jcr.PropertyType.BOOLEAN 
 Whether or not to include articles in the search result 
includeStructurePagesjavax.jcr.PropertyType.BOOLEAN 
 Whether or not to include structure pages in the search result 
   
 Index fields 
summaryFieldjavax.jcr.PropertyType.STRING 
 Name of the summary field 
titleFieldjavax.jcr.PropertyType.STRING 
 Name of the title field 
nameFieldjavax.jcr.PropertyType.STRING 
 Name of the name field 
namepathFieldjavax.jcr.PropertyType.STRING 
 Name of the name path field 
urlFieldjavax.jcr.PropertyType.STRING 
 Name of the absolute URL field 
uriFieldjavax.jcr.PropertyType.STRING 
 Name of the relative URL field 
lastPublishedFieldjavax.jcr.PropertyType.STRING 
 Name of the last published field 
sizeFieldjavax.jcr.PropertyType.STRING 
 Name of the size field 
siteFieldjavax.jcr.PropertyType.STRING 
 Name of the site field 
mimetypeFieldjavax.jcr.PropertyType.STRING 
 Name of the mime type field 
   
 Misc 
useCustomIndexjavax.jcr.PropertyType.BOOLEAN 
 Whether or not a custom index is used 
   
 Aggregated portlet preferences/settings: 
templatesjavax.jcr.PropertyType.WEAKREFERENCE 
 A temporary Node holding all sub-templates used by the main template. See available properties in table below 
bundlejavax.jcr.PropertyType.WEAKREFERENCE 
 A temporary Node holding all i18n:ized texts used for output. See available properties in table below 
Properties available for the templates Node
NameType and Description 
searchFormScriptTemplatejavax.jcr.PropertyType.STRING 
 The search form script Velocity template 
Properties available for the bundle Node
NameType and Description 
searchHereTextjavax.jcr.PropertyType.STRING 
 The i18n:ized search here text (en: "Search here") 

Denna sida publicerades: 2012-05-10

Skriv ut PDF-avsnitt

Hjälpte informationen på den här sidan dig?

Missa inga nya rön, tips och tricks! Prenumerera på insite!

Find us!

SiteVision AB (Headquarter)
Vasagatan 10
702 10 Orebro
Sweden

Info: +46 19-17 30 30
Support: +46 19-17 30 39

Latest Tweets