23355 Posts in 17838 Topics by 2862 members
|Go to End||Next >|
24 July 2009 at 6:30am
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.
24 July 2009 at 6:43am
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!
24 July 2009 at 6:54am
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?
24 July 2009 at 7:16am
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.
24 July 2009 at 7:53am
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.
24 July 2009 at 7:59am
Excellent! Glad I could help you out.
19 January 2010 at 11:26pm
Thanks for the info, if you want to remove the Comments section you need to use:
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.
3 April 2010 at 1:29am
How can I remove the link to: "Files & Images"?
None of these work:
CMSMenu::remove_menu_item('Files & Images');
CMSMenu::remove_menu_item('Files & ImagesAdmin');
|Go to Top||Next >|