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.

All other Modules /

Discuss all other Modules here.

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

Dashboard Module


Go to End


84 Posts   27698 Views

Avatar
Mo

Community Member, 541 Posts

1 October 2009 at 11:21pm

Also, I have tried overwriting the $menu_priority variable using Object::set_static, but it doesn't seem to work for the Class CMSMain :(

Avatar
Mo

Community Member, 541 Posts

2 October 2009 at 3:48am

Right, I have just released version 0.3. It seems to be more stable and should play better with CMSWorkflow.

I have also added some static variables:

$rss_url
$limit_pages
$limit_files
$limit_ucomments

If you add for example:

DashboardAdmin::$rss_url('http://rss/url') to your _config.php file, this will overwrite the default feed address.

The other variables accept Integers, and represent the maximum number of pages/files/unmoderated comments will be shown.

Hope that helps, hope you enjoy :)

Cheers,

Mo

Avatar
UncleCheese

Forum Moderator, 4102 Posts

2 October 2009 at 4:48am

Gah! It collides with DOM.

"I can't handle sub-URLs of a DsCMSMain object."

Avatar
Mo

Community Member, 541 Posts

2 October 2009 at 4:52am

What version of SS are you running?

I don't understand what you mean by colliding with DOM, do you mean you are getting a JavaScript error?

Mo

Avatar
UncleCheese

Forum Moderator, 4102 Posts

2 October 2009 at 5:03am

No.. DOM = DataObjectManager. Sorry.. that acronym has taken on a totally different meaning in Silverstripe.

Avatar
Mo

Community Member, 541 Posts

2 October 2009 at 5:09am

Hmm, the only reason DsCMSMain exists is to load the Javascript that overwrites some of the Ajax.

Is there a better way to do that, in which case, I could remove that class?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

2 October 2009 at 5:30am

Can't you just do LeftAndMain::require_javascript()?

Avatar
Mo

Community Member, 541 Posts

2 October 2009 at 6:05am

The trouble with using that approach is that the Javascript file is loaded to soon, and so is overwritten by the default javascript for CMSMain.

It ideally needs to be the last file loaded, or into the page.

Why is DOM looking for sub-URL's? Surely it should just look at CMSMain for those, as DsCMSMain is just an extension of it?