Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Ongoing serial number

Lukas_Biedermann October 7, 2019

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
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 7, 2019

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)

Lukas_Biedermann October 12, 2019

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".

Lukas_Biedermann October 14, 2019

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.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 15, 2019

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
AUG Leaders

Atlassian Community Events