The macros Blog Posts & PagesTop Stories Slider and News Boxes have a parameter called Lucene Query. This  parameter is a very flexible Parameter and can be used to:

All these different usage types can be combined to build a very detailed and dynamic content selection.

Enterprise Theme  version 5.2.0 or greater is needed

On this page:


Related articles:

Examples

Usage of the Confluence Search Syntax

In this example we select all blogs with the word Confluence in the title. The whole syntax is documented in the article Confluence Search Syntax.

title:Confluence*

 

Filter by metadata

If you use the Metadata Add-on by Communardo, you can filter the results by the metadata in the following way to show only content with the metadata City:Berlin .

title:Confluence* AND metadatafield.city:Berlin

How to determine the name of the metadata field and some more examples can be found in Use the Communardo Metadata Add-on with the Enterprise Theme News Macros.

Filter by the User Profile

If you use the Metadata Add-on and the User Profile Add-on by Communardo you can combine these to use the profile information of the current user. This allows you to provide a very user specific listing.

metadatafield.city:upc.currentUser.Location

The part upc.currentUser.Location will be replaced by the Location of the user (if such a field exists). More information about this feature can be found in Use the Communardo User Profiles Add-on with the Enterprise Theme News Macros

Available variables in the context of the parameter 

There are some variables you can use within the Lucene parameter:

VariableDescriptionExample
$user

The current user

$user.name
$spaceKey
The spaceKey of the current space 
$content, $page
The current viewed content object com.atlassian.confluence.core.ContentEntityObject 
$contentId
The id of the current content object 
$helper
An instance of the class com.atlassian.confluence.themes.ThemeHelper 
$req
The current request 

Comments  (0)

Attachments  (3)

Add Attachment
  File Modified
PNG File image2016-11-17 14:39:22.png 17. Nov. 2016 by Oliver Sträßer
PNG File image2016-11-17 14:45:44.png 17. Nov. 2016 by Oliver Sträßer
PNG File image2016-11-17 14:49:21.png 17. Nov. 2016 by Oliver Sträßer