| |||||||
FRAMES NO FRAMES |
id
attribute. Each result is a DataObject with the following variables:name
- The name of the result.description
- The description of the result. Not present if there is no description.rank
- The rank of the result.resulthref
- The href of the result link (a friendly URL for portal items,full gatewayed URL for Collaboration and Publisher items).resultonclick
- The onclick handler for result link. Not present if there is no onclick handler.resulttarget
- The target window name for result link. Not present if there is no target.icon
- The URL for the icon of the result.iconalttext
- Alternate text for the icon.iconheight
- The height of the icon in pixels.iconwidth
- The width of the icon in pixels.lastmodified
- A string representation (in current locale) of the last modified date.pathwaysid
- The id to use when adding/deleting a tag for the result.ptsource
- The Application source of the result. Used when adding/deleting a tag for the result.propertieshref
- The href of the properties link. Not present if there is no properties link.propertiesonclick
- The onclick handler for the properties link. Not present if there is no properties link.isbestbet
- True if the result is a best bet, and false otherwise.isinmultiplefolders
- True if the result lives in more than one Knowledge Directory folder.folderpathhref
- The href for the link to the Knowledge Directory folder for this result. Not present if there is none.folderpath
- The name of the Knowledge Directory folder for this result. Not present if there is none.projectonclick
- The onclick handler for the link to the Collaboration project containing this result (for Collaboration results only). Not present if not a Collaboration result.projectname
- The name of the Collaboration project containing this result. Not present if no name is found.lastpublishedby
- The name of the last publishing user (for Publisher results only). Not present if not a Publisher result.associatedobjectsonclick
- The onclick handler for the link to associated objects (for Publisher results only). Not present if not a Publisher result.tagskey
- The key to access the search result's tags properties. Not present if Pathways is disabled.This simple example loops through results and shows the rank, name (as a clickable link) as well as tags for each result.
<pt:searchpage.searchresultsdata pt:id="results"/>
<pt:logic.foreach pt:data="results" pt:var="result">
<pt:logic.value pt:value="$result.rank"/>. <pt:core.html pt:tag="a" href="$result.resulthref" onclick="$result.resultonclick" title="$result.name"><pt:logic.value pt:value="$result.name"/></pt:core.html>
<pt:logic.foreach pt:data="$result.tagskey" pt:var="resulttag">
<pt:logic.value pt:value="$resulttag.value"/>
</pt:logic.foreach>
</pt:logic.foreach>
Tag Information | |
Tag Name | searchresultsdata |
Attributes | ||||
Name | Type | Required | Default Value | Description |
search | string | false | N/A | This attribute allows you to perform a search query directly in tags without user input. Note that adding a search query to the page can significantly decrease performance. Caching the search result on the user scope and then only using this tag if the search result doesn't already exist can help improve performance. |
searchclass | int | false | -1 | This attribute allows you to search for a particular type of object (i.e. class ID). By default this tag will search for all object types. This attribute only works if you are performing a new search using the search attribute of this tag. |
searchfolders | string | false | N/A | This attribute allows you to specify which folders to search. The folder IDs are specified as ints and can be either a single int (1) or a comma separated list of ints (1,2,3). The folders will by Document Directory folders if the search class is documents, and admin folders otherwise. This attribute only works if you are performing a new search using the search attribute of this tag. |
searchsubfolders | boolean | false | false | This attribute allows you to specify whether or not subfolders should be included in the search. This attribute only works if you are performing a new search using the search attribute of this tag. |
maxresults | int | false | 10 | This attribute allows you to set the maximum number of results returned by the search query. This attribute only works if you are performing a new search using the search attribute of this tag. |
ordering | int | false | 1 | This attribute allows you to order the results by a particular search property. The possible values include: name (1), description (2), created (3), last modified (4), document type (6) - only for documents, and content language (8) - only for documents. Make the ordering value negative to sort in descending order, or positive to sort in ascending order. This attribute only works if you are performing a new search using the search attribute of this tag. |
id | string | true | null | The name of the variable in memory where the DO data created by this tag is stored. Specify this ID in the data attribute (most commonly the DATAVAR attribute) for any display tag consuming DO data. Multiple data tags can share the same ID, in which case they are added to a list in the order they were processed. |
scope | string | false | portlet request | The scope used to store the data. See the Logic tag library for a list of all available scopes. |
| |||||||
FRAMES NO FRAMES |