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

Is there a way to make labels mandatory in confluence?

Jan Mueller July 15, 2013

I'm looking for a way to make labels mandatory when creating or updating a confluence page.
The requirement is to have at least 3 labels per page.

How would I best achieve it?

5 answers

1 accepted

2 votes
Answer accepted
Vinay July 18, 2013

Hello,

In Admin section you can include custom HTML. I guess you can include script tag in that HTML to achive this.

Please refer : https://confluence.atlassian.com/display/CONFKB/How+to+Use+JavaScript+in+Confluence

Hope this helps.

1 vote
Matthew J. Horn
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.
July 22, 2013

I would start by trying it in the HTML header of the create page action. I haven't thought this through yet, but there's probably a way to trigger the add label function off of the create page function.

1 vote
Matthew J. Horn
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.
July 17, 2013

I was thinking that you could do it on page load. You can add jQuery to the header of the HTML page. Maybe you can add labels directly, or maybe you can do it with a REST call from jQuery. Sorry I don't have time to look into it further, but maybe someone else can chime in that might have done this before.

Jan Mueller July 18, 2013

Hello Matthew. I would trigger it when the user clicks on save or preview. But into which file would I write my jquery code into?

0 votes
Jan Mueller July 17, 2013
Hi Matthew, thanks for your reply. I was thinking about a plugin rather. If there is no plugin - where would I put my jquery code? Can you guide me into the right direction?
0 votes
Matthew J. Horn
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.
July 15, 2013

If there were some logic for how users went about creating a page, then you could use some templates that contains some or all of the labels. This would be the quick/dirty solution and probably isn't applicable. The real solution would probably involve some heavy JS or JQuery lifting to enforce.

Jan Mueller July 17, 2013

Hi Matthew, thanks for your reply. I was thinking about a plugin rather. If there is no plugin - where would I put my jquery code? Can you guide me into the right direction?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events