I’d like to have a graphic and search above the toolbar. Currently I’m using a DHTMLX toolbar and the layout module. The toolbar is at the top of the page and is attached to the layout, but it’s not in a pane. I’m guessing I have to put both the elements above the toolbar and the toolbar into panes if I want elements above the toolbar.
Please, clarify your question. May be provide exepted result on a picture.
Let’s say i’m using the 3E layout. 3 horizontal panes. The top pane is a banner with a logo and search box. In the next pane I attach a DHTMLX toolbar. And the last pane has content. By default I assume it sizes the frames equally. 33% height on each, correct? But, I only want the height of the 1st and 2nd pane to be as high as the objects in them. For example, the height of the pane with the toolbar should only be as thick as the toolbar. So, do I use the setHeight() method? Or is there a better way to approach this?
In this case (if you use fullscreen layout) you can attach header:
dhtmlx.com/docs/products/dht … ooter.html
Then you need just use iC layout attach toolbar to the cell A or the the whole toolbar:
dhtmlx.com/docs/products/dht … olbar.html
Then you will attach your content in the cell A
Header might work, but your second link has nothing above the toolbar so that won’t work.
See screenshot below
The banner with the logo, search AND the toolbar will be on every page of the site. The content area won’t always be one pane. It might be 2 or more.
If you attach toolbar as global layour item (not in the cell):
dhxToolbar = dhxLayout.attachToolbar();
It will be permanent in all the pages
That approach does not work. When you create your layout object you can attach it to document.body or a DIV. Regardless, it is always rendered at the top of the page. You can try and add markup above it, but you won’t see it.
I’m going to try attachHeader()
If that doesn’t work, i’ll try putting my banner and toolbar into it’s own file, then attach it to a cell.
attachHeader works.
Can you attach a file instead of an ID?
what you mean under file?
Yes, i’m doing it the same way. But the header is static HTML.
Headers are often global, so static HTML is not practical.
It should be an include
It would be nice if this was possible.
layout1.attachHeader(‘file.html’);
I will just have to create my own include.
Hi
you can use
Nope, using dhtmlx layout. You can’t put anything above the layout. That’s why i’m using attachHeader()
Anyway, I assume attachHeader() can’t point to a file. That would be a nice feature. It would eliminate one of my Server Side includes.
Case closed.