17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2018 Views |
-
Remove behaviour and access tabs

4 December 2008 at 10:56pm
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");
$fields->removeByName("Behaviour"); // doesnt work -> behaviour tab is still there
$fields->removeByName("To-do"); // it works-> to do tab is removed
} -
Re: Remove behaviour and access tabs

10 December 2008 at 10:20pm Last edited: 10 December 2008 10:23pm
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.
CMSMenu::remove_menu_item('Identifier');
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.
| 2018 Views | ||
|
Page:
1
|
Go to Top |

