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.

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.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Customizing cms menu doesn't work well


Go to End


2 Posts   1276 Views

Avatar
ud2013

Community Member, 6 Posts

29 May 2013 at 10:19pm

Hello all,

I have a question, well maybe a couple of question. I use ss3.

I've been trying to add a new menu item to the cms (to customize the cms for a client), what I have done is the following:

I have created the following pages.

In the mysite/code folder:
FilterSettings.php

class FilterSettings extends ModelAdmin {
	
	public static $managed_models = array('FilterSetting');
	static $url_segment = 'filtersettings';
	static $menu_icon = 'framework/admin/images/filtersettings.png';
	static $menu_title = 'Filter Settings';
	
}

In the mysite/code folder:
FilterSetting.php

class FilterSetting extends DataObject {

	static $db = array('filter_name' => 'VarChar(50)','filter_type'=>'VarChar(50)','filter_active'=>'int(1)');
}

After I run:

mydomain.com/admin/?flush=all

The new menu item is shown, when I click on it, there is nothing shown on the right, this is correct because there is nothing to be shown yet. But when I click on another menu item (Pages for example). Nothing is shown aswell, while the pages part should be shown.

Can anyone help with this?

The other question is the following.

How and where do I need to put the files when customizing the cms menu. Now I had put them into the mysite/code, but the documentation is not very clear on where to put what code?

Thanks.

Avatar
cwchong

Community Member, 13 Posts

4 June 2013 at 9:25am

You mentioned you did a /admin/?flush=all but did you do a /dev/build/?flush=1 ?