Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Remove behaviour and access tabs


3 Posts   2216 Views


4 December 2008 at 10:56pm Community Member, 6 Posts

I am trying to remove the behaviour and access tabs but without any results. This is my code in page.php class.

function getCMSFields() {
$fields = parent::getCMSFields();
$fields->removeByName("Behaviour"); // doesnt work -> behaviour tab is still there
$fields->removeByName("To-do"); // it works-> to do tab is removed


10 December 2008 at 9:47pm Community Member, 6 Posts

Nobody can help me?


10 December 2008 at 10:20pm (Last edited: 10 December 2008 10:23pm), Community Member, 25 Posts

I've used this in mysite/_config.php for a recent site I've done, where I wanted to make the CMS very simple by putting pages along the top, and not having a sidebar, with only a few tabs on each page.


Where Identifier is the name of the class which calls that part of the CMS - look in /cms/code for them.

CMSMain is Site Content, and the odd one out. The others should be fairly easy - CommentAdmin is Comments, ReportAdmin, NewsletterAdmin, AssetAdmin, etc.

You can also add your own to the menu with

CMSMenu::add_link($code, $menuTitle, $url, $priority = -1)

Where $code is an arbitrary name, no spaces ('AboutPage', 'Blue', 'Yes_no'), $menuTitle appears as the link text, $url is the link itself, and $priority moves it between left and right. Higher priority is left, lower priority is right.