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

Reload Sitetree


Go to End


2 Posts   1810 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/');