how can I display the space id in the article itself?

I want to assign an id to every knowledge article created. As I dont want to do it manually, I was hoping to have the actual relevant article id displayed on the page itself.

How can this be done?

3 answers

Every page within confluence is assigned a page ID. You can see this when you edit an article, are in attachment or page information view (under Tools menu). It appears at the end of the URL in the form "pageId=1146905". Would this page ID work?

 

Hi Bill,

 

Thanks for the inputs. I'm looking for the page id to be displayed quite visibly near the title so that it can be easily picked up/viewed/searched.

0 vote
Steven Behnke Community Champion Mar 18, 2016

How would you want this displayed? Are you on Confluence Server or Confluence Cloud?

0 vote
Steven Behnke Community Champion Mar 20, 2016

I use a bit of javascript in the Custom HTML section of Confluence to add this effect – 

image2016-3-21 1:9:59.png

 

You could extend it to add the Page ID.

<script>
AJS.toInit(function(){
    var pageIdentifier = ", page ID " + AJS.Meta.get('page-id');
    AJS.$('.last-modified').append(pageIdentifier);
});
</script>

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

780 views 23 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you