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

Ongoing serial number

Hi,

i'm new to confluence and node.js so please excuse my lack of knowledge.

So my question is, is it possible (with a selfmade macro for example) to automatically give every new site an ongoing number in the title / in the content area? We use Confluence as Cloud service.

So it looks like this:  Example 

 

Best regards,

Lukas

1 answer

0 votes

I could use the page id as a serial number - it's unique and can be used to construct a url to view or edit the page.  Or the string in the "short url" link.

On server you can write a user macro that exposes either of these in the page, but on Cloud you can't write user macros.  You'll just have to read the "page information" to get them (the page id is in the url, the tiny macro in a field)

Okay but this tutorial is for creating macros / addons for the cloud isn't it?

Tutorial 

Refering to this tutorial, how can i show the page id instead of "Hello World".

I have tried to access the URL  in JS with "document.locaion.href" but this cannot work because the node app creates a whole new HTML document in the Host Document. I really don't know how to solve this.

Sorry for the delay, bit behind at the moment.

Yes, the doc you have found is for writing apps for Cloud, which should be able to do this.  I mentioned "user macros" which Cloud users cannot write for themselves.

I'm afraid I don't know about coding for Cloud like this, I've only ever written for Server Confluence and only a very light touch Jira Cloud.

Like Lukas Biedermann likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

306 views 9 7
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