Skip to main content
Skip table of contents

SearchResult

Represents one item in the SearchResults.

Display all search results

XML
<ul>
    #foreach ($searchResult in $searchResults.items)
        <li>$searchResult.description</li>
    #end
</ul>

Additional context for $searchResult.object

If the search-result-object is of type 'page' you get access to the page-object and it's properties when calling $searchResults.object.


Methods

NameTypeDescription
$searchResult.absoluteLinkString

The absolute link to this object.

$searchResult.descriptionString

A description of this search result (usually the page or blog post title).

$searchResult.displayTitleString

The display title of this search result (usually the page or blog post title).

$searchResult.getDescription(maxLength)String

A description of this search result (usually the page or blog post title).

ParameterTypeDescription
maxLengthintThe maximum length of the returned description.
$searchResult.getProperty(key)String

The property of this search result for the given key. This will access the so-called content properties, which are different from the properties defined by the Page Properties macro.


Example Keys:


  • confluence.user.profile.position
  • confluence.user.profile.department
  • confluence.user.profile.location


ParameterTypeDescription
keyStringThe key of the user property.
$searchResult.linkString

The relative link to this object.

$searchResult.linkAsTextString

The relative, decoded link to this search result.

$searchResult.objectLinkable

The backing object of the search result.

$searchResult.qualifiersList<SearchResultQualifierPlaceholder>

A list of this search result's qualifiers. Qualifiers are only available when using the CQL search.

Returns: the qualifiers

$searchResult.typeContentType

The type of the search result.


Possible values:


  • page
  • blog_post
  • user
  • status
  • attachment


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.