Remove an item from the Add Page menu

Hello all I'd like to remove the "Add Page" menu item from the Add Page menu so that it forces people to use the template. I think this may be possible based on this article but I could be wrong https://answers.atlassian.com/questions/25187/how-to-promote-use-of-existing-templates-with-new-add-menu-options Is it possible to remove an item altogether? Thanks in advance Brian

5 answers

1 accepted

I couldn't get the AJS scripts to work to fix this issue. In the end, I used JavaScript to remove the entry with the following

<script>
document.getElementById('add-page-item').style.display= "none";
</script>

This works in Conf 4.2:

AJS.$('#add-menu-link-space li:first').remove();

Add it to your "Custom HTML".
Peter Koczan Atlassian Team Jun 25, 2013

Just one thing to add: put it between

<script type="text/javascript">

and

</script>

This didn't seem to work unfortunately. I'm using version 4.2.4 version of Confluence and added the script tags. Do I need to enable JavaScript somewhere?

The easiest way to do this would be to just add a little jQuery that removes the first item in the drop down list. I've used jQuery before to customize my menus like that and it works great.

0 vote
Peter Koczan Atlassian Team Jun 25, 2013

Hi Brian,

Can you let me know the Confluence version you are using?

Thanks,

Peter

Hi Peter

I'm using 4.2.4 and unfortunately the script didn't work (even with the script tags)

Any ideas? Do these scripts need to be enabled somehow?

0 vote
David Simpson Community Champion Jul 01, 2013

@Brian Bricham: Matthew's answer was almost right, but really it the JS needs wrapping in an AJS.toInit method...

In Confluence Admin | Look & Feel | Custom HTML paste this into At the End of the BODY:

&lt;script&gt;
  AJS.toInit(function(){
    AJS.$('#add-menu-link-space li:first').remove();
  });
&lt;/script&gt;

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
Published Thursday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

89 views 0 6
Read article

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