<div id="ext-gen45"> <div id="ext-gen46"> <div id="the-quip-div">Quip stuff here.</div> </div> </div>
<div id="my-cmp-div">My CMP stuff here.</div> <div id="ext-gen45"> <div id="ext-gen46"> </div> </div>

<?php
$jsUrl = $modx->getOption('assets_url') . 'components/my-cmp/' . 'js/';
$modx->regClientStartupScript($jsUrl.'make-box.js'); var QuickCMP = function(config) {
config = config || {};
QuickCMP.superclass.constructor.call(this,config);
};
Ext.extend(QuickCMP,Ext.Component,{
page:{},window:{},grid:{},tree:{},panel:{},combo:{},config: {}
});
Ext.reg('quickcmp',QuickCMP);
var QuickCMP = new QuickCMP();
QuickCMP.page.Object = function(config) {
config = config || {};
Ext.applyIf(config,{
components: [{
xtype: 'box'
,id: 'quickcmp-box'
}]
});
QuickCMP.page.Object.superclass.constructor.call(this,config);
};
Ext.extend(QuickCMP.page.Object,MODx.Component);
Ext.reg('quickcmp-page-home',QuickCMP.page.Object);
Ext.onReady(function() {
var qcmp = MODx.load({
xtype: "quickcmp-page-home"
});
var panel =Ext.getCmp("quickcmp-box");
var el = Ext.get("my-cmp-div");
el.appendTo(panel.el);
});


Having a brain malfunction. What is the Revo equivalent of insideManager()?
if ($modx->context->get('key') == 'mgr') {
/* in mgr */
}
Thanks! Got it working.
I created a js file called make-box.js and put it in /assets/components/my-cmp/js/ .
Then I added these two lines of code to the end of my CMP. It doesn’t organize the CMPs like Bruno17’s php code does, but I just wanted the custom manager pages to scroll. Make sure your CMP has a wrapper div that has the id of my-cmp-div.
<?php $jsUrl = $modx->getOption('assets_url') . 'components/my-cmp/' . 'js/'; $modx->regClientStartupScript($jsUrl.'make-box.js');
make-box.js code (the only part I changed from Bruno17’s is the id of the div to my-cmp-div):
var QuickCMP = function(config) { config = config || {}; QuickCMP.superclass.constructor.call(this,config); }; Ext.extend(QuickCMP,Ext.Component,{ page:{},window:{},grid:{},tree:{},panel:{},combo:{},config: {} }); Ext.reg('quickcmp',QuickCMP); var QuickCMP = new QuickCMP(); QuickCMP.page.Object = function(config) { config = config || {}; Ext.applyIf(config,{ components: [{ xtype: 'box' ,id: 'quickcmp-box' }] }); QuickCMP.page.Object.superclass.constructor.call(this,config); }; Ext.extend(QuickCMP.page.Object,MODx.Component); Ext.reg('quickcmp-page-home',QuickCMP.page.Object); Ext.onReady(function() { var qcmp = MODx.load({ xtype: "quickcmp-page-home" }); var panel =Ext.getCmp("quickcmp-box"); var el = Ext.get("my-cmp-div"); el.appendTo(panel.el); });