Item - Search results portlet
From VYRE
(Redirected from Item search results portlet)
| Item - Search results portlet | |
|---|---|
| module: | Content module |
| supplier: | VYRE Ltd. |
This document describes how to use the item search results portlet.
Contents |
[edit] Item search results
The item search results portlet can be used both on normal and item display pages (see "setting up pages" for more information). An item search results portlet produces a list of items from a data store, file store, or a combination of results from one or more of each of these.
The portlet has four tabs:
[edit] Items Tab - Options
[edit] Stylesheet
- XSL Style Sheet: select which style sheet to use to display the list of items returned. This option uses shortcut functionality.
[edit] XML options
| Option | XPath | Notes |
| Lightweight search mode | /search-results/items/data-item/content; /search- results/items/{file|data}-item/metadata | Toggles basic information about the items; if this option is unchecked, the system will return the full content and metadata of the items |
| Retrieve linked items | /search-results/items/{file|data}-item/item-links and beyond | If this option is checked the system will retrieve lightweight information of the items linked to the items being returned providing those linked items exist |
| Retrieve full content/metadata of linked items | /search-results/items/{file|data}-item/item-links/item-link/item/{file|data}-item/content; /search-results/items/{file|data}-item/item-links/item-link/item/{file|data}-item/metadata | Only applicable if Retrieve linked items is checked - returns the full content and metadata of the items linked to the items being returned |
| Retrieve linked users | /search-results/items/{file|data}-item/user-links and beyond | If this option is checked the system will retrieve lightweight information on the users linked to the items being returned |
| Retrieve full content of linked users | /search-results/items/{file|data}-item/user-links/user-link/users/user/properties | Only applicable if Retrieve linked users is checked - returns the full profile information of the users linked to the items being returned |
| Retrieve item lists | /search-results/items/{file|data}-item/item-lists and beyond | Toggles item list block |
| Retrieve localizations of each item | /search-results/items/{file|data}-item/localizations | Retrieves the localized language versions of each of the items being returned |
| Retrieve export configs | /search-results/export-configs | Toggles Export Configs XML block |
| Retrieve PDF templates for each item | /search-results/items/{file|data}-item/pdf-templates | Toggles PDF Template XML block |
| Show categories as taxonomy structure | /search-results/items/{file|data}-item/categories; /search-results/items/{file|data}-item/taxonomy | Toggles between flat+nested VS basic taxonomy |
| Load version history | /search-results/items/{file|data}-item/version-history | Toggles visibility of item version XML |
| Load the creators profile picture | /search-results/items/{file|data}-item/creator/user-profile-picture | Toggles creator profile picture block |
| Load the modifiers profile picture | /search-results/items/{file|data}-item/last-modifier/user-profile-picture | Toggles last modifier profile picture block |
[edit] Search mode
- Use incoming search query: uses a search query (sent from an item search portlet) to inform which items are returned
- Use a saved search: select a save search to inform the list of items that are returned. You can combine this with an incoming search query (for example, you might create a saved search to return all published news items within certain embargo or expiry dates, and use an incoming search query to allow the user to search only published stories. This option uses shortcut functionality.
- List all items from a store: lists all active items from a file or data store
[edit] Sorting Tab - Options
- First Sort Field: you can select which attribute to sort by first. The default list is Score, Name, Creation date, Modification date and View count. If you have set any other sort fields (see Content > Data/File Stores > Edit > Edit... > Set Sortable Attributes) they will appear here. You can check the checkbox to have the system sort in descending order.
- Second Sort Field: you can select which attribute to sort by second. For this option to work, you must check the Use second sort field option. The default list is Score, Name, Creation date, Modification date and View count. If you have set any other sort fields (see Content > Data/File Stores > Edit > Edit... > Set Sortable Attributes) they will appear here. You can check the checkbox to have the system sort in descending order.
- Sort locale: this will sort the items in relation to the locale of the site. Items that are of the same locale as the site will appear first.
- Sort by url parameters. Users can select the sort field from outside of the sorting Tab(edit mode of the portlet) by passing in action parameters which can be found in the xml [/search-results/action-extensions/sortable-attributes/score] returned by the search result portlet.
- Example XML output for Sorting
<?xml version="1.0" encoding="UTF-8"?> <search-results> <action-path>/vyre4/pub_module/pageview1214_9?portal:componentId=1493&amp;portal:type=action&amp;portal:isSecure=false</action-path> <action-extensions> <sortable-attributes> <score>&amp;sortBy=score</score> <name>&amp;sortBy=sort_name</name> <creationDate>&amp;sortBy=sort_creationDate_t</creationDate> <lastModifiedDate>&amp;sortBy=sort_lastModifiedDate_t</lastModifiedDate> <viewCount>&amp;sortBy=viewCount</viewCount> <orderCount>&amp;sortBy=orderCount</orderCount> <att67>&amp;sortBy=sort_att67_s</att67> </sortable-attributes> <sort-directions> <asc>&amp;orderBy=asc</asc> <desc>&amp;orderBy=desc</desc> </sort-directions> </action-extensions> <sorting> <first-sort-field>name</first-sort-field> <first-sort-field-direction>asc</first-sort-field-direction> </sorting> <items> <data-item .../> <data-item .../> <data-item .../> </items> </search-results>
- Example XSL Code Usage for Sorting
<a href="{/search-results/action-path}{/search-results/action-extensions/sortable-attributes/lastModifiedDate}{/search-results/action-extensions/sort-directions/asc}">sort by lastMod</a>
[edit] Pagination Tab - Options
[edit] Filtering Tab - Options
[edit] Filtering by locale
- Select Locale: select the locale you wish to filter the results by. Leave blank for no filtering
[edit] Item link filtering:
- User item link filtering:check this box to filter results by particular link definitions (only results with the selected link definition will appear in the results list)
- Available link definitions: select one or more link definitions to filter by. Only applicable if "use item link filtering" is checked.
Profile group filtering: check this box to use profile group filtering. The items returned will be linked to a profile group to which the current user is a member
[edit] Item attribute to user property filtering:
- Filter by matching item attribute and user property: check this box to filter results; only items with a specified attribute that matches a specified property of the current user's profile will be returned
- Attribute ID: the ID of the attribute to match
- User Property: the name of the user profile property to match
- Default: if the user does not have any value for a particular property, use the named profile property to match to



