Include Content by Label for Confluence

Overview

Screenshots

Installation and Configuration

You can install the plugin from the Atlassian Marketplace or UPM, see Installing Add-ons.

You do not have to configure the plugin.

Usage

This macro can be used to display the content of different sites that are labeled with a certain label, e.g. "testlabel_1". There can be used more than one label per macro-usage. In this case a simple comma as delimiter invokes an "or" concatenation of the given labels. If you want to display only the content of pages that are labeled with more than one label, set the optional parameter "operator" to "and".

Examples

{include-content-by-label:testlabel_1}
{include-content-by-label:testlabel_1, testlabel_2}
{include-content-by-label:testlabel_1, testlabel_2|operator=and}
{include-content-by-label:testlabel_1|key=@self}
{include-content-by-label:testlabel_1|maxResults=5}
{include-content-by-label:testlabel_1|showEditButtons=both}
{include-content-by-label:testlabel_1|sort=modified|reverse=true}
{include-content-by-label:testlabel_1|type=page}
{include-content-by-label:testlabel_1|heading=h1}
{include-content-by-label:testlabel_1|divider=hr}

Optional Parameters

Name

Possible values

Default value

Description

key

@self; @all; space-name

@all

Can be used to display only content that is available in the given space.

sort

creation; modified; title

title

Can be used to set the manner in which the found pages will be sorted.

operator

and; or

or

Can be used to set the concatenation of more than one given label-name.

maxResults

Any integer > 0

Integer.MAX_VALUE

Can be used to restrict the number of pages that should be displayed.

showEditButtons

both; bottom; none; top

top

Can be used to display none, one or two edit buttons for each of the inserted pages.

heading

""; h1; h2; ...; h6

""

Can be used to include the title of an included page with the given heading.

divider

""; br; hr; (arbitrary text)

""

Can be used to separate page includes. Values entered will be escaped and can be arbitrary text. hr and br will show the corresponding html tags

type

"", page, blogpost

""

Can be used to allow only displaying of content of special content types. More than one is possible, the needed delimiter is a simple comma.

Version history

1.6

 fix reverse sort by title

Previously, the following configuration (reverse sort by title) was not always handled correctly (but the results may have been sorted in ascending order by title instead):

Version 1.6 of the Include Content By Label macro handles reverse sort by title correctly.

 support for local PDFs referenced by the viewpdf macro

Previously, viewpdf macros referencing PDF attachments relatively from their page / blog post or space could not be rendered from the including page.

Version 1.6 of the Include Content By Label macro transforms these viewpdf parameters into absolute references, enabling PDFs from included pages to be displayed on the including page.

 support for space-local attachments from other spaces

While version 1.4 of the Include Content By Label macro already supported page-local attachments on included pages or blog posts (i.e., attachments from the same page or blog post, for which Confluence uses relative references), references to resources in the same space were still not rendered correctly if included from another space.

Version 1.6 finally closes this issue: ICBL-6 - Getting issue details... STATUS

Previous versions

see https://marketplace.atlassian.com/plugins/com.tngtech.confluence.plugins.includecontentbylabel/versions

 

Issues

type key summary reporter status
Loading...
Refresh