You can create hierarchical SlideMenu by adding a sub SlideMenuParent to another SlideMenuParent.
Please review the code sections for more details.
<?php
require $KoolControlsFolder."/KoolSlideMenu/koolslidemenu.php";
$ksm = new KoolSlideMenu("sm");
$ksm->scriptFolder = $KoolControlsFolder."/KoolSlideMenu";
$ksm->styleFolder = $KoolControlsFolder."KoolSlideMenu/styles/black";
$ksm->addParent("root","corporate","Corporate",null,true);
//About us
$ksm->addParent("corporate","aboutus","About Us",null,true);
$ksm->addChild("aboutus","news","News");
$ksm->addChild("aboutus","team","Team");
//Careers
$ksm->addParent("corporate","careers","Careers");
$ksm->addChild("careers","joboffers","Job Offers");
$ksm->addChild("careers","environment","Environment");
$ksm->addParent("root","services","Services");
$ksm->addChild("services","products","Products");
$ksm->addChild("services","solutions","Solutions");
$ksm->addChild("services","certifications","Certifications");
$ksm->addParent("root","work","Work");
$ksm->addChild("work","clients","Clients");
$ksm->addChild("work","tesimonials","Tesimonials");
$ksm->addChild("work","faq","FAQ");
$ksm->width="200px";
$ksm->singleExpand = true;
?>
<form id="form1" method="post">
<link rel="stylesheet" href="blackstyle.css" />
<?php echo $ksm->Render();?>
</form>
/* Extra css for SlideMenu black style.*/
.blackKSM .ksmLevel0 .ksmLevel1 .ksmParent .ksmIn
{
background:none;
color:#CCCCCC;
height:20px;
line-height:20px;
}
.blackKSM .ksmLevel0 .ksmCollapse .ksmParent .ksmIn
{
background:none;
font-weight:normal;
}
.blackKSM .ksmLevel0 .ksmLevel1 .ksmParent:hover .ksmIn
{
background:#535152;
}
.blackKSM .ksmLevel1 .ksmParent .ksmIn .ksmLeft
{
background:none;
}
.blackKSM .ksmLevel1 .ksmChildBox .ksmCBB
{
padding:0px 0px;
}
.blackKSM .ksmLevel1 .ksmChild .ksmIn
{
padding-left:15px;
}