We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28508
    • 73 Posts
    Sorry, don’t want to push, but I don’t think the answer is that difficult, I just don’t get it:

    Is there any show() method which returns the html/js stuff?

    Thank you guys.
      • 27935
      • 16 Posts
      Bobray I meant the modx object in ExtJS smiley

      Thanks anyways.

      By the way I have decided against components written for the manager interface as a web user.

      stetus: Even if you crack that bit. You may still have to figure how to get permissions for the web context to use the processors. I have just posted that as a question, for a different purpose though.

      http://modxcms.com/forums/index.php/topic,62224.0.html
        • 18373 ☆ A M B ☆
        • 3,141 Posts
        Quote from: stetus at Feb 28, 2011, 06:08 PM

        Sorry, don’t want to push, but I don’t think the answer is that difficult, I just don’t get it:

        Is there any show() method which returns the html/js stuff?

        Thank you guys.

        An xtype is like a "template" as I like to refer to them. Objects which can contain other objects, items, configuration etc. There’s no show() method, but you need to refer to the xtype in the JS which you use to build up your CMP.

        Here’s a part of the JS I use for the VersionX home tabbed interface. See how I used xtype in that piece twice.
        VersionX.panel.Hometabs = function(config) {
            config = config || {};
            Ext.apply(config,{
                border: false
                ,baseCls: 'modx-formpanel' // Basic class to use -> styles the whole thing.
                ,items: [{ // Multidimensional array of items in the panel.Hometabs config
                    html: '<h2>'+_('versionx.versionx')+'</h2>'
                    ,border: false
                    ,cls: 'modx-page-header' // Header class
                },{
                    xtype: 'modx-tabs' // Use the MODx tabs "template"
                    ,bodyStyle: 'padding: 10px'
                    ,defaults: { border: false ,autoHeight: true }
                    ,border: true
                    ,stateful: true
                    ,stateId: 'versionx-home-tabpanel'
                    ,items: [{ // Items to display (which are tabs in this case)
                        title: _('versionx.overviewTitle')
                        ,defaults: { autoHeight: true }
                        ,items: [{ // First tab contents
                            html: '<p>'+_('versionx.overviewDescription')+'</p>'
                            ,border: false
                            ,bodyStyle: 'padding: 10px'
                        },{ // Second item in the first tab
        						html: '<h3>'+_('versionx.devTitle')+'</h3>'+
        							'<p>'+_('versionx.devDescription')+'</p>'
        						,border: false
        						,bodyStyle: 'padding: 10px'
        					 }]	
                    },{ // Second tab
                        title: _('versionx.resourcesTitle')
                        ,defaults: { autoHeight: true }
                        ,items: [{
                            html: '<p>'+_('versionx.resourcesDescription')+'</p>'
                            ,border: false
                            ,bodyStyle: 'padding: 10px'
                        },{
                            xtype: 'versionx-grid-resources' // This xtype refers to something I declare later
                            ,preventRender: true
                        }]
                    }

        From https://github.com/Mark-H/VersionX/blob/master/assets/components/versionx/js/hometabs.panel.js
          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.