Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Add label to Confluence template based on a Variable

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 Aug 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
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

342 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you