, width: 85
Looks like the "childrens class_key" setting has no effect? I set it to "Gallery" (moregallery by modmore) but a new resource doesn't has this class_key. The class_key should be added as a GET parameter, so moregallery can load.Actually the drop down selection on the Document tab is set, but you're right, the resource page itself is not changed.
text: config.record['gridclasskey-property-grid-addnewdocbtn-text'] || _('gridclasskey.document_new')
, id: 'gridclasskey-property-grid-addnewdocbtn'
, iconCls: 'icon-gridclasskey-document-new'
, handler: function(itm, e) {
Ext.getCmp('modx-resource-tree').loadAction(
'a=' + MODx.action['resource/create']
+ '&parent=' + config.record.id
+ (config.record.context_key ? '&context_key=' + config.record.context_key : '')
+ (config.record.properties
&& config.record.properties.gridclasskey
&& config.record.properties.gridclasskey['child-template']
? '&template=' + config.record.properties.gridclasskey['child-template']
: '')
);
}
text: config.record['gridclasskey-property-grid-addnewdocbtn-text'] || _('gridclasskey.document_new')
, id: 'gridclasskey-property-grid-addnewdocbtn'
, iconCls: 'icon-gridclasskey-document-new'
, handler: function(itm, e) {
Ext.getCmp('modx-resource-tree').loadAction(
'a=' + MODx.action['resource/create']
+ '&parent=' + config.record.id
+ (config.record.context_key ? '&context_key=' + config.record.context_key : '')
+ (config.record.properties
&& config.record.properties.gridclasskey
&& config.record.properties.gridclasskey['child-template']
? '&template=' + config.record.properties.gridclasskey['child-template']
: '')
// add the following code
+ (config.record.properties
&& config.record.properties.gridclasskey
&& config.record.properties.gridclasskey['child-class_key']
? '&class_key=' + config.record.properties.gridclasskey['child-class_key']
: '')
);
}Anyway, thanks for this awesome extra!Yw
[ed. note: goldsky last edited this post 12 years, 6 months ago.]