How do I add html object to the item on the accordion

I use dhtmlxLayout and accordion to build page. The accordion is attached to a div which is included the div attached to “b” item in dhtmlxLayout. When I want to add some html object to any item of the accordion, I can’t find anything on the page. Why is this?
My code almost like this:

dhxLayout = new dhtmlXLayoutObject(document.body, "5I");
dhxLayout.cells("a").setHeight(150);
dhxLayout.cells("a").hideHeader();
dhxLayout.cells("a").attachObject("layoutA");
dhxLayout.cells("b").setWidth(250);
dhxLayout.cells("b").attachObject("layoutB");
//the following is the accordion
var dhxAccordLeft = new dhtmlXAccordion("leftTree");
dhxAccordLeft.addItem("a", "A栋");
dhxAccordLeft.addItem("b", "B栋");
dhxAccordLeft.addItem("c", "C栋");
dhxAccordLeft.cells(id).attachObject("leftAccordTemplate");
//the following is some of the html code
<!-- layoutB -->
<div id="layoutB" style="background-color:#e3e3e3">
	<div id="leftTree"></div>
</div>
<div id="leftAccordTemplate">
	xdsdfewr<input type="text"/>
</div>

Hello
First of all there is a method attachAccordion() for layout:
docs.dhtmlx.com/doku.php?id=dhtm … ccordion&s[]=attachaccordion
dhtmlx.com/docs/products/dht … rdion.html
And then you can add to your accordion cell HTML object via method attachObject:
docs.dhtmlx.com/doku.php?id=dhtm … chobject&s[]=attachobject
dhtmlx.com/docs/products/dht … bject.html

Hi, Darya. I just found out the answer last night. After I added “dhxAccordLeft.enableMultiMode(1);”, the accordion worked normally, but I didn’t know why. And how do I do to make the cell on the accordion height auto. I mean when the content height is higher than the cell, the cell will reset the height itself to adapt the content?

To set autoheight for a cell you can use the next:
myAccordion.cells(“a1”).setHeight(‘*’);
Multimode has its own default cell height. If you set for cell “a1” autohtight - it will just increase its height to fill the rest apce of the container - see the image



Code sample:

myAccordion = myLayout.cells("b").attachAccordion("accord"); myAccordion.enableMultiMode(true); myAccordion.addItem("a1", "a"); myAccordion.addItem("a2", "b"); myAccordion.addItem("a3", "c"); myAccordion.cells("a1").attachObject("comboDiv"); myAccordion.cells("a2").attachObject("comboDiv2"); myAccordion.cells("a3").attachObject("comboDiv3"); myAccordion.cells("a1").setHeight('*'); myAccordion.openItem("a1");