This topic contains 6 replies, has 4 voices, and was last updated by Sean Sean 1 year, 6 months ago.

How to show all sidebar items by default


  • henry.lin
    Participant

    Posts: 2
    Member Reply #7232

    As titled. thanks.

    Sean
    Sean
    Keymaster

    Posts: 4226
    Support Staff Reply #7249

    Hi,

    I assume you are referring to Admin 1 sub theme and you can use below markup to expand all sub menus by default:

    <ul>
    <li class=”nav-item open”>
    <a class=”nav-link nav-toggle”>
    <i class=”icon-diamond”></i>
    <span class=”title”>UI Features</span>
    </a>
    <ul class=”sub-menu always-open”>……….</ul>
    </li>
    </ul>

    If you need any further clarifications please let us know.

    Thanks


    ZFayaz
    Participant

    Posts: 8
    Member Reply #7250

    Submenus get closed after page refresh, i need to maintain status/ keep focus on that submenu


    jonahfang
    Participant

    Posts: 12
    Member Reply #7289

    I want to expand all sub-menus at sidebar first show.

    Sean
    Sean
    Keymaster

    Posts: 4226
    Support Staff Reply #7301

    Hi ZFayaz,

    To maintain the menu state you will need to use server side code to handle the HTML output as per your requirements. I would suggest you to check below tutorials to understand how HTML code can be integrated with server side code in order to produce dynamic pages:

    http://www.dreamincode.net/forums/topic/242835-creating-a-simple-dynamic-website-with-php/
    http://www.webdeveloper.com/forum/showthread.php?214680-How-to-make-a-dynamic-HTML-file-with-PHP
    https://www.sitepoint.com/php/

    Thanks.


    henry.lin
    Participant

    Posts: 2
    Member Reply #7376

    Hi,

    I tried your suggestion but no luck. I want to expand all menu items. How to do it?

    Sean
    Sean
    Keymaster

    Posts: 4226
    Support Staff Reply #7388

    Hi henry.lin,

    Could you please open a new post for your issue and provide follow details:

    1) What Metronic version are you using ?
    2) Which sub theme are you using(Admin 1 or admin 2, etc) ?
    3) Will it be possible to provide us a test link to your page in a private reply so we can check your code online ?

    Thanks.

You must be logged in to reply to this topic.