Why add another file? Why not just do this in the LeftAndMainDecorator.php file? It's empty and states that it's there for additional functionality.
We've moved the forum!
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.
- Previous 10 entries
- 1
- Page 22(current)
- 3
- Next 10 entries
Hi Terry-
Excellent question! It's considered a 'best practice' to avoid modifying the core files so your changes are protected against core updates. With SilverStripe, you update the cms/, jsparty/, and sapphire/ folders to upgrade, so if you've made adjustments to files in these folders they would be lost.
Setting up your own modules to extend core functionality is not that hard to do... the example posted earlier is just a basic demonstration of that principle.
Hope that helps!
John
Good Point! I didn't think about it from that perspective. I am still relatively new to this CMS (WP and EE switch). I like this A LOT!
Can you tell me how to remove the 'Page Version History' and 'Site Reports' accordion style on the left?
I've been using it for about a year and I'm a big fan!
There is no default config setting for either of these display areas, so you'll need to create a new template to override the existing one. Again, we'll either place this in a module (alphabetically greater than 'cms'), in mysite/, or in your themes/<yourtheme> folder. For the sake of this example, let's use your mysite/ folder.
The template file to override is located at cms/templates/Includes/CMSMain_left.ss, so you'll need to copy this to mysite/templates/Includes/CMSMain_left.ss. At the bottom of this template, you'll see the h2 headings for 'heading_versions' and 'heading_reports'. Just delete everything below these h2 tags that applies (div class="listpane" for each) and save. Then reload your admin with ?flush=1 and you should be good to go!
Let me know how it works out for you.
John
That worked perfectly!
I like to keep things consistent so I created a 'mysite/templates/Includes' structure like most/all other modules do and placed it there. I like how simple and easy it is to make a change like that...and to separate these changes from the 'Core' files.
Excellent! Glad I could help you out.
-John
Thanks for the info, if you want to remove the Comments section you need to use:
CMSMenu::remove_menu_item('CommentAdmin');
It took me a while to figure out that I had to add Admin behind it. Thought I'd mention it here in case some else is having trouble to find this small detail too.
How can I remove the link to: "Files & Images"?
None of these work:
CMSMenu::remove_menu_item('Files&Images');
CMSMenu::remove_menu_item('Files & Images');
CMSMenu::remove_menu_item('Files & ImagesAdmin');
CMSMenu::remove_menu_item('Files&ImagesAdmin');
CMSMenu::remove_menu_item('Files&ImagesAdmin');
CMSMenu::remove_menu_item('Files&Images');
- Previous 10 entries
- 1
- Page 22(current)
- 3
- Next 10 entries