In a CMP I have a window that opens with the following item as one of its fields:
,{
xtype: 'modx-combo-browser'
,browserEl: 'modx-browser'
,fieldLabel: 'Photo/logo'
,name: 'photosource'
,hideFiles: true
,openTo: config.record.openTo || ''
,id: 'photosource-file'
,anchor: '90%'
,maxLength: 255
,value: config.record.photosource || ''
}
The window is called from a handler in the getMenu method of a grid. The handler makes an ajax request which, on success, shows the window and uses setValues to fill in some data (including the config.record.photosource seen in the code above). The value shown in the combo-browser is correct.
When I click the input however, the browser does not open in the correct directory. I have two questions:
1. in the openTo property of the item in the code above, what is the format of the data required? Is this a path or url? Relative or absolute? And will this make the browser open in the right folder?
2. How do I make the browser open in a particular media source (even if I have to hard code this)?