Skip to main content
Skip table of contents

CQL Search Table Macro

This macro is only available from version 1.3.0 onwards.

Introduction


Similar to CQL Search Macro, this macro allows you to execute contextual searches with predefined CQL.

Results are displayed in a table with configurable columns.

Configuration


Field Name

Required

Default Value

Explanation

Additional Information

CQL


(tick)

Enter a CQL statement with $$query$$ or $$query*$$ as the search term.

Default Query Term



Enter a default query term to replace the $$query$$ in CQL.
Search results will be preloaded if it is provided.

*Note: $self returns current page title

No. of Results per Page

10

Select the no. of results to be displayed:

  • 5 — Pagination will occur if there are >5 search results

  • 10 — Pagination will occur if there are >10 search results

  • 50 — Pagination will occur if there are >50 search results

  • 100 — Pagination will occur if there are >100 search results

If there are more results than the selected no. of results to display, pagination will occur.

Custom "No Results Found" message



Enter a customised message when no results are found.

Table Template


title, space, modified

Select the template to use for results table.

  • comments

  • created

  • creator

  • labels

  • modified

  • modifier

  • space

  • title

  • type

  • url

  • version

  • Page Properties

Separate template values using ",". See default value for example.

Template Header



Enter customised headers to replace default template header.

If not provided or provided incorrectly, specified header will not be applied.

Features


Hidden Search Bar

Search bar is hidden when “Default Query Term” is used. This allow page owner to use the macro to create listing which users can view-only.

Table Template for customising table columns

The available template are as follows:

Available Template Terms

Result

comments

Shows number of comments on page

creator

Shows creator of page / file

labels

Shows all labels on page

modified

Shows last modified date

modifier

Shows user who last modified page/ file

space

Shows space where file / page is located

title

Shows title of file / page

type

Indicate if item found is an attachment / page

url

Indicate the url to space where page is located / page where attachment is located

version

Shows latest available version for file / page

When provided incorrectly, only correct templates will be used

E.g. For template “title, spaces, modified, labels”

  • “spaces” is incorrect (should be space)

  • Results will only show table with table headers “title, modified, labels”

E.g. For template “titles, spaces, label, types”

  • None of the template terms used is correct

  • Default template will be used to display results (“title, space, modified”)

Template Header for customising table headers

To allow users to customise table headers, a template header field is provided. Users can rename template values to a more suitable value for the results table they are creating.

In the example shown above, changes to template header are as follow:

  • Creator → Owner

  • Modified → Last Modified

Headers defined incorrectly will result in default template being used (over-defined / under-defined).

E.g. For the template “title, type, creator, modified” , if header “title, type, owner” is defined

  • Only 3 headers are defined for 4 template (under-defined)

  • Header defined will be ignored, template “title, type, creator, modified” will be used as header instead.

If no header is defined, template “title, type, creator, modified” will be used.

JavaScript errors detected

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

If this problem persists, please contact our support.