Search Page Tags for Adaptive Layout
Tag searchresultsdata


Generates the data needed to show a list of search results, and stores it in memory using the variable name specified by the id attribute. Each result is a DataObject with the following variables:
Use tags from the Logic library to iterate over the list and display results. This tag only works with the Search Page Adaptive Layout, unless a new query is provided using the search attribute.

Example:
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 Namesearchresultsdata

Attributes
NameTypeRequiredDefault ValueDescription
searchstringfalseN/AThis 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.
searchclassintfalse-1This 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.
searchfoldersstringfalseN/AThis 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.
searchsubfoldersbooleanfalsefalseThis 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.
maxresultsintfalse10This 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.
orderingintfalse1This 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.
idstringtruenullThe 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.
scopestringfalseportlet requestThe scope used to store the data. See the Logic tag library for a list of all available scopes.


Copyright 2005 Plumtree Software, Inc.