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

CMS assets ajax file selector customization


Go to End


2 Posts   1512 Views

Avatar
ROlckers

Community Member, 8 Posts

19 July 2011 at 4:44pm

I would like to know where (specifically in which file and function) the code is executed when a request similar to the one below is sent (via ajax):

http://<URL>/admin/EditForm/field/<PAGETYPE>/EditFileForm/field/ExistingFile/tree?forceValue=

This request is sent when a file from e.g. Attach Image -> From the file store is selected and the dropdown field is populated with a list of files. I suspect it has everything to do with CMSMain.php -> getEditForm(), however I'm not sure and don't want to just start hacking away.

Your help would be greatly appreciated!

Avatar
Sam

Administrator, 690 Posts

5 August 2011 at 10:14am

I assume that ExistingFile is a TreeSelectorField? In that case this URL will be handled by the tree() method of TreeSelectorField.