Check documentation for the latest version of dhtmlxSuite setTemplate DHTMLX Docs


applies a template for sidebar

void setTemplate(string template,string iconsPath);
templatestringtemplate name
iconsPathstringpath to the folder with icons (optional)


// init sidebar
var mySidebar = new dhtmlXSideBar({
    parent: "sidebarObj",
    template: "details",
    icons_path: "icons/16x16/",
    width: 160,
    items: [
        {id: "a1", text: "Item 1", icon: "image1.png", selected: true},
        {id: "a2", text: "Item 2", icon: "image2.png"}
// change template on the fly
mySidebar.setTemplate("tiles", "icons/32x32/");

Back to top