Livesearch Macro
Screenshot: page with a Livesearch macro showing search results for the search term 'printer'
Add this macro to your page
To add the Livesearch macro to a page:
- From the editor toolbar, choose Insert > Other Macros.
- Choose Livesearch from the Navigation category.
- Use the parameters below to narrow down the content to be searched.
- Choose Insert.
You can then publish your page to see the macro in action.
Screenshot: configuring the Livesearch macro to search for pages with particular labels in a specific space.
Change the macro parameters
Macro parameters are used to change the behaviour of a macro.
To change the macro parameters:
- In the editor, click the macro placeholder and choose Edit.
- Update the parameters as required then choose Insert.
Here's a list of the parameters available in this macro.
Parameter | Default | Description |
---|---|---|
Restrict to this Space Key | all spaces | Specify a space key to limit the search to a single space. Case-sensitive. You can't specify multiple spaces. Alternatively, use |
Restrict to label(s)(labels ) | Specify labels to limit the search to content with that label. If unspecified will search all content regardless of label. | |
Size (size ) | medium | Choose a medium or large search field size. |
Placeholder text(placeholder ) | Specify the placeholder text to appear in the search field, for example 'Search this space' | |
Type(type ) | all | Specify the content types to be included in the search - choose from pages, blogs, comments, space descriptions, or all content types. |
Additional(additional ) | space name | Display the space name, a page excerpt or nothing under the search result. |
Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example
).
Other ways to add this macro
Add this macro as you type
Add this macro using wiki markup
This is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.
Macro name: livesearch
Macro body: None.
{livesearch:spaceKey=DOC|size=large|placeholder=Search this space}