Khudadad

I 'm doing this like bellow : in my controller I declare $menu = '...'; and <$sub_menu = '....'; and check it in the views.

 <li class="<?php if ($menu == 'purchase') echo "active open dropdown"; ?>">
                                <a role="button" tabindex="0"><i class="fa fa-shopping-cart"></i> <span>Purchase Management</span> <span class="badge bg-lightred"></span></a>
                                <ul>
                                    <li class="<?php if ($sub_menu == 'purchase_list') echo "active"; ?>"><a href="/purchase"><i class="fa fa-caret-right"></i> Purchase List</a></li>
                                    <li class="<?php if ($sub_menu == 'add_new_purchase') echo "active"; ?>"><a href="/purchase/add" ><i class="fa fa-caret-right"></i> Add New Purchase</a></li>
                                </ul>
                            </li>

Return to Thread...