Livesearch Macro

Add the Livesearch macro to a page to provide a fully customizable search field. When someone starts typing into the search field, Confluence will suggest matching pages, blogs, or comments. 

This macro is great when you want to:

  • provide a way to search the current space, such as in a knowledge base
  • encourage people to search for particular types of content, such as pages with a particular label.

Because you can limit the search by space, label, content type, you can provide a very targeted search experience for people viewing your space. 

On this page:

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:

  1. Unable to render {include} The included page could not be found.
  2. Choose Livesearch from the Navigation category.
  3. Use the parameters below to narrow down the content to be searched.
  4. 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

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

Here's a list of the parameters available in this macro. 

Parameter

Default

Description

Restrict to this Space Key
(spaceKey

all spaces

Specify a space key to limit the search to a single space. Case-sensitive. You can't specify multiple spaces.

Alternatively, use @self to restrict the search to the current space.

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
mediumChoose 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
allSpecify the content types to be included in the search - choose from pages, blogs, comments, space descriptions, or all content types.
Additional
(additional)
space nameDisplay the space name, a page excerpt or nothing under the search result.

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

Other ways to add this macro

Add this macro as you type

Unable to render {include} The included page could not be found.

Add this macro using wiki markup

Unable to render {include} The included page could not be found.

Macro name: livesearch

Macro body: None.

{livesearch:spaceKey=DOC|size=large|placeholder=Search this space}
Last modified on May 20, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.