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

how to force the reload of the cms admin panel?


Go to End


2 Posts   2124 Views

Avatar
mattconfusion

Community Member, 48 Posts

20 July 2010 at 2:27am

How to reload the damin panel forcing it with a function? I know there is LeftAndMain::ForceReload(); , but i don't know where to put it. I need to refresh the admin panel after a getCMSAction is done... somthing like this does not work:


   function  getCMSActions(){
      
     $actions = parent::getCMSActions();
      
     $action_1 = new FormAction(
            "doaction1",
            "Perform action1"
         );
     $actions->push($action_1);
	 
	 $action_2 = new FormAction(
            "doaction2",
            "Perform action2"
         );
     $actions->push($action_2);
	 
	 
	 
     LeftAndMain::ForceReload();
     return $actions;
  }

where do i put it?

Avatar
guywatson

Community Member, 16 Posts

19 April 2011 at 11:54am

Hi

I also have this problem, did you find a solution, or does anyone else know how?

Thanks