Module: alfresco/search/AlfSearchResult

alfresco/search/AlfSearchResult

This is used as the standard search result template used to control the layout of search results. It is more efficient to use a single widget to control the layout than to build a complex model control the layout than to build a complex model out of smaller widgets, out of smaller widgets, however this widget can still be easily replaced by other widgets to provide a completely custom rendering.
Author:
  • Dave Draper
  • David Webster
License:
Source:

Extends

  • alfresco/lists/views/layouts/Row

Members

additionalDocumentAndFolderActions :string

This allows additional action filters to be added (as opposed to defining a new array of action filters in the documentAndFolderActions attribute.) Any actions defined in this attribute will be added to the original filtered list.
Type:
  • string
Default Value:
  • null
Source:

additionalOtherNodeActions :string

This allows additional action filters to be added (as opposed to defining a new array of action filters in the documentAndFolderActions attribute.) Any actions defined in this attribute will be added to the original filtered list.
Type:
  • string
Default Value:
  • null
Source:

cssRequirements :object[]

An array of the CSS files to use with this widget.
Type:
  • object[]
Default Value:
  • [{cssFile:"./css/AlfSearchResult.css"}]
Source:

customActions :object[]

The customActions to apply to the configuration of the enclosed XhrActions widget.
Type:
  • object[]
Since:
  • 1.0.38
Default Value:
  • null
Source:

documentAndFolderActions :string[]

This can be configured to override the default filter for the actions that are applicable to folder and document nodes. Actions need to be filtered as Aikau does not currently support all of the actions that can be configured in Alfresco Share. However, if custom actions are provided by an extension or further filtering is required then they can be configured using this attribute.
Type:
  • string[]
Default Value:
  • null
Source:

enableContextMenu :boolean

Indicates whether or not to enable the context menu to show the actions with a right-click.
Type:
  • boolean
Default Value:
  • false
Source:

highlightPostfix :string

This is the property within the currentItem that should be used to identify the content with in the renderedValue to highlight.
Type:
  • string
Since:
  • 1.0.92
Default Value:
  • ""
Source:

highlightPrefix :string

The prefix string that indicates the start of text to highlight.
Type:
  • string
Since:
  • 1.0.92
Default Value:
  • ""
Source:

highlightProperty :string

This is the property within the currentItem that should be used to identify the content with.
Type:
  • string
Since:
  • 1.0.87
Deprecated:
Default Value:
  • null
Source:

highlightValue :string

This is initialised to the highlightProperty property within the currentItem when the [showSearchTermHighlights]{@link module:alfresco/search/AlfSearchResult#showSearchTermHighlights} is configured to be true.
Type:
  • string
Since:
  • 1.0.87
Deprecated:
Default Value:
  • null
Source:

i18nRequirements :object[]

An array of the i18n files to use with this widget.
Type:
  • object[]
Default Value:
  • [{i18nFile: "./i18n/AlfSearchResult.properties"}]
Source:

mergeActions :boolean

Indicates whether or not the standard actions (e.g. those derived from Document Library XML configuration) should be merged with any customActions and widgetsForActions. This is applied to the configuration of the enclosed XhrActions widget.
Type:
  • boolean
Since:
  • 1.0.38
Default Value:
  • false
Source:
The navigation target for links. By default this will result in links being opened in the current window/tab but this can be configured to be "NEW" so that links are opened in a new window/tab.
Type:
  • string
Since:
  • 1.0.39
Default Value:
  • "CURRENT"
Source:

newTabOnMiddleOrCtrlClick :boolean

Indicates whether or not a middle-button mouse click (or left click with the control key depressed) on the link should result in links being opened in a new browser tab. If this is configured to be true then the a "target" attribute of "NEW" will be configured on the payload.
Type:
  • boolean
Since:
  • 1.0.50
Default Value:
  • true
Source:

otherNodeActions :string[]

This can be configured to override the default filter for the actions that are applicable to all nodes that are neither folders nor documents. Actions need to be filtered as Aikau does not currently support all of the actions that can be configured in Alfresco Share. However, if custom actions are provided by an extension or further filtering is required then they can be configured using this attribute.
Type:
  • string[]
Default Value:
  • null
Source:

showMoreInfo :boolean

Indicates whether or not a MoreInfo widget should be rendered with the search result.
Type:
  • boolean
Default Value:
  • true
Source:

showSearchTermHighlights :boolean

Type:
  • boolean
Since:
  • 1.0.87
Default Value:
  • false
Source:

showSelector :boolean

Indicates whether or not a Selector widget should be rendered with the search result.
Type:
  • boolean
Since:
  • 1.0.33
Default Value:
  • false
Source:

siteLandingPage :string

The standard landing page for a site
Type:
  • string
Since:
  • 1.0.38
Default Value:
  • "/dashboard"
Source:

templateString :String

The HTML template to use for the widget.
Type:
  • String
Source:

widgetsAbove :object[]

This can be configured to be an array of renderer widgets to place above the central column of result properties. It should be a standard widget model array.
Type:
  • object[]
Default Value:
  • null
Source:

widgetsBelow :object[]

This can be configured to be an array of renderer widgets to place below the central column of result properties. It should be a standard widget model array.
Type:
  • object[]
Default Value:
  • null
Source:

widgetsForActions :object[]

The customActions to apply to the configuration of the enclosed XhrActions widget.
Type:
  • object[]
Since:
  • 1.0.38
Default Value:
  • null
Source:

Methods

createActionsRenderer()

This function is called to create an XhrActions widget. It can be overridden to replace the default widget with a reconfigured version.
Source:

createContentSnippet()

Since:
  • 1.0.92
Source:

createContextActionsWidget()

This function is called to create an XhrContextActions widget. It can be overridden to replace the default widget with a reconfigured version. This function is only called when enableContextMenu is configured to be true.
Source:

createDateRenderer()

This function is called to create a DateLink widget to render the date that the result was created or last modified. It can be overridden to replace the default widget with a reconfigured version.
Source:

createDescriptionRenderer()

This function is called to create a Property widget to render the description of the result. It can be overridden to replace the default widget with a reconfigured version.
Source:

createDisplayNameRenderer()

This function is called to create a SearchResultPropertyLink widget to render the displayName of the result. It can be overridden to replace the default widget with a reconfigured version.
Source:

createMoreInfoRenderer()

This function is called to create a MoreInfo widget that can be used to retrieve the full metadata for the result and display it in a dialog. It can be overridden to replace the default widget with a reconfigured version. It will only be rendered if showMoreInfo is configured to be true.
Source:

createPathRenderer()

This function is called to create a PropertyLink widget to render the path to the result. It can be overridden to replace the default widget with a reconfigured version.
Source:

createSelectorRenderer()

This function is called to create a Selector widget. It will only be rendered if showSelector is configured to be true.
Since:
  • 1.0.33
Source:

createSiteRenderer()

This function is called to create a PropertyLink widget to render the name of the site in which the result can be found (if applicable). It can be overridden to replace the default widget with a reconfigured version.
Source:

createSizeRenderer()

This function is called to create a Size widget. It can be overridden to replace the default widget with a reconfigured version.
Source:

createThumbnailRenderer()

This function is called to create a SearchThumbnail widget. It can be overridden to replace the default widget with a reconfigured version.
Source:

createTitleRenderer()

This function is called to create a Property widget to render the title of the result (if it has one). It can be overridden to replace the default widget with a reconfigured version.
Source:

createWidgetsAbove()

Creates any additional widgets defined through configuration directly above the main column of result properties.
Source:

createWidgetsBelow()

Creates any additional widgets defined through configuration directly above the main column of result properties.
Source:

generateActionFilters()

This function is used to generate the action filters that are used for filtering the actions to show for documents and folders and for any other type of node.
Source:

postCreate()

Creates the renderers to display for a search result and adds them into the template. Renderers will only be created if there is data for them. This is done to further improve the performance of the search rendering.
Source: