works fine for me.
Object::addStaticVars('LeftAndMain', array(
'removed_menu_items' => array(
'statistics',
'newsletter',
'comments'
)
));
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
works fine for me.
Object::addStaticVars('LeftAndMain', array(
'removed_menu_items' => array(
'statistics',
'newsletter',
'comments'
)
));
Ya you had newsletters (plural) it should only be singular.
It'll work for all of them, just a matter of testing the proper names.
That will only remove the statistics from the CMS view. If you want to disable statistics completely (eg stop keeping PageView counts) You need to remove the lines below (like lines 86-87) From sapphire/core/control/ControlController.php
// Log page views
// Statistics::collect(); add a // before Statistics::collect() like this or remove this completely
great, thanks....yeah I just put 'newsletters' because that was the name on the menu. & yes will, I did uncomment that line....thanks all.
(edit: Duh, I didn't see the second forum page with everyone else's reply)
@galilee: For removing the newsletter links, I tried "newsletter" (singular, not plural) and it worked :)
Object::addStaticVars('LeftAndMain', array(
'removed_menu_items' => array(
'newsletter',
)
));
-fumble