Add label to Confluence template based on a Variable

Deleted user July 12, 2018

When a new page is created using a template I want a label to be assigned the value of a specific variable on the page so that I can then use the label as a filter in the Page Properties Report.

The scenario is this:

I have a set of pages containing Trade Partners and another set of pages listing all the sales events (conferences etc.) that we attend.

  • In the Events Template I want a Label that equals the content of the PartnerName variable.
  • I then want to have a section in the Trade Partners page that lists all the events this Partner runs.

Is this possible or am I going about it the wrong way?

1 answer

0 votes
Chii
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 20, 2019

Templates do not allow variably named labels - they only allow a statically named set of labels. 

Blueprints, on the other hand, allows some programmatic control over the resulting page. In this case, you could potentially add the required labels by listening to the `com.atlassian.confluence.plugins.createcontent.api.events.BlueprintPageCreateEvent`, and checking that the blueprint is the one you're interested in (using `com.atlassian.confluence.plugins.createcontent.events.BlueprintPageCreateEvent#getBlueprint`)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events