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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

Reload Sitetree


Go to End


2 Posts   1383 Views

Avatar
pelse

Community Member, 14 Posts

1 July 2011 at 1:41am

Hi Folks,

I have wrote a function thats change the ParentID of a Page.
After reload the browser the Sitetree in CMS show the changed Page under right Parent Page.
How can I refresh the CMS Sitetree by Code for example in function onAfterWrite()?

Thanks a lot.

Avatar
swaiba

Forum Moderator, 1899 Posts

1 July 2011 at 4:08am

probably not the answer you were looking for (as it would reload the entire admin) but possibly add something like...

Director::redirect(Director::baseURL().'admin/');