Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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 "id" attribute to Confluence containers/elements ?


I want my users to be able to create and edit documents in Confluence

I then use Confluence as a CMS using the REST API to retrieve that content and display it on public facing websites.


I'm currently using NodeJS/Cheerio in conjunction with Handlebars templates to do this but to parse and manipulate the content effectively I need some way of identifying page elements and containers.

At the moment it appears as though the only solution is to create HTML elements but this will require additional training for the admin and documentation personnel which I would prefer to avoid.

Can anyone suggest an alternative course of action? My preference is to use ID elements but I can't see a way to have Confluence render HTML with ID elements.

2 answers

This is a bad hack - Is it possible to use other attributes, such as 'title' to store the Id information for the elements/containers within a page?


Actually, if an ID could be applied to a container I think it would be quite an elegant hack. Users would be free to format the content in any way they saw fit and I'd be able to decompose the content blocks according to the container IDs - everybody's happy, no?

However, to answer your question, the answer is "Not really". There are a limited number of ways that Confluence decorates content marked up with the Confluence style tags but they tend to resolve to header and other standard HTML tags which aren't unique. 

Currently the only robust solution I can find is to use a very strict template which uses HTML wrappers to surround content blocks.

I'll probably end up moving to a headless CMS at some point.. which is both a shame and not DRY

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

321 views 9 7
Read article

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