We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24865
    • 289 Posts
    Alright. The topic title might not reveal all that is going on here, so I’ll keep it short.

    I am trying to create a border layout with a west, south and center region. Rendering with the default code provided by the lovely people at Sencha (formally known as ExtJS), I get only a header with the title text.
    return new Ext.Panel({
    	renderTo: 'testcmp-container',
    	width: 700,
    	height: 500,
    	title: 'Border Layout',
    	layout: 'border',
    	layoutConfig: {
    		renderHidden: true,
    	},
    	items: [{
    		title: 'South Region is resizable',
    		region: 'south',     // position for region
    		height: 100,
    		split: true,         // enable resizing
    		minSize: 75,         // defaults to 50
    		maxSize: 150,
    		margins: '0 5 5 5'
    	},{
    		// xtype: 'panel' implied by default
    		title: 'West Region is collapsible',
    		region:'west',
    		margins: '5 0 0 5',
    		width: 200,
    		collapsible: true,   // make collapsible
    		cmargins: '5 5 0 5', // adjust top margin when collapsed
    		id: 'west-region-container',
    		layout: 'fit',
    		unstyled: true
    	},{
    		title: 'Center Region',
    		region: 'center',     // center region is required, no width/height specified
    		xtype: 'container',
    		layout: 'fit',
    		margins: '5 5 0 0'
    	}]
    });


    Pretty default, eh? Well, it is. After checking out a couple of examples, I still haven’t figured it out. It used to be a piece of cake with other apps, but perhaps MODx is hiding some styles (or missing them).

    If you check this link and click on "Border" under the foldout tree "Basic Ext Layouts", you get what I am trying to do.
    http://dev.sencha.com/deploy/dev/examples/layout-browser/layout-browser.html

    My code renders to the testcmp-container, which is returned by my controller (return ’<div id="testcmp-container"></div>’;).

    What am I missing?
      @MarkGHErnst

      Developer at Adwise Internetmarketing, the Netherlands.
      • 24865
      • 289 Posts
      After fiddling with autoHeight and applying some padding, I found that the panels are rendered and that autoHeight is a bad guy in this instance, since the border layout requires a bit of tweaking and fixed width and height. I think I fixed the problem for now! smiley
        @MarkGHErnst

        Developer at Adwise Internetmarketing, the Netherlands.