<?php 
$ApiMenu=$this->mainMenu()->getMenu('Api Menu');
$api_cms_pages = $ApiMenu['responsedata'];
?>

<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 203px;">

        <section class="sidebar">
            <!-- Sidebar user panel -->

            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu">
 
                  
                    <li>
                    <a href="<?php echo $this->url('api'); ?>">
                        <i class="fa fa-circle"></i> <span>Term & Condition</span>                         
                         <i class="fa fa-angle-left pull-right"></i>
                    </a>
                       
                        <ul class="treeview-menu">
                            <?php if(count($api_cms_pages)>0){ 
                                foreach($api_cms_pages as $value){
                            
                            ?>
                            <li>
                                 <i class="fa fa-angle-left pull-right"></i>
                                
                                 <a href="<?php echo $this->url('api', array('action' => 'api-document'),array('query'=>array('id'=>$value['menu_id']))); ?>"><?php echo $value['menu_name'];?></a>
                            </li>
                            <?php }} ?>
                        </ul>
                    </li>
                
               


            </ul>
        </section>

    </div>
    <!-- /.sidebar -->
</aside>