Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • rafar Friend
    #940171

    Hello,

    A question related to the T3 Framework Menus:
    There is two menus:

    • one for large screens <div class="t3-navbar navbar-collapse collapse">
    • And one for small screens: <div class="t3-navbar-collapse navbar-collapse collapse">. The elements of that one (ul/li/a) seems to be generated by javascript. Could you please help : where is this javascript file located?? (I d like to add elements into the s of that menu for small screens.

    Thanks!

    rafar Friend
    #940172

    i’d like to add elements du the <a>s like data-toggle=modal to the mobile menu

    thanks

    Pankaj Sharma Moderator
    #940361

    Hi
    The class are defined in the PHP code . You can go to /tpls/blocks/mainnav.php and customize the code .

    rafar Friend
    #940572

    Hi,

    thanks for this

    I understand from the mainnav.php that the script that creates the menu is nav-collapse.js `
    <?php $this->addScript(T3_URL.’/js/nav-collapse.js’); ?>

    
    my problem is that this script seems to remove the attributes from "a" like data-toggle=modal, and i would like to maintain these attributes....
    rafar Friend
    #940606

    Hello for your info:

    This is what I have under the `
    <div class="t3-navbar navbar-collapse collapse">

    (the menu for large screens):

    <a itemprop="url" class="" href="#" title="connexionmodal" data-target="#login-modal" data-toggle="modal">Connexion

    
    and this is what I have under the menu for small screen and phones:`
    <div class="t3-navbar-collapse navbar-collapse collapse in" aria-expanded="true">

    and for the a in the div > ul > li > a: `
    <a itemprop="url" href="#" title="connexionmodal">Connexion

    
    It seems the av-collapse.js removes the "data" elements.
    
    Also selecting title="connexionmodal" to add the data elements works for the bug menu but not the small menu, confirming that something in the T3 framework code prevents to add "data" elements to the "small" menu.
    
    Your help is welcome!
    rafar Friend
    #940607

    div for the small menu is div class="t3-navbar-collapse navbar-collapse collapse in" aria-expanded="true"

    Ninja Lead Moderator
    #940997

    @rafar: You will see all js scripts work with the menu of T3 framework

    plugins/system/t3/base-bs3/js/script.js
    plugins/system/t3/base-bs3/js/menu.js
    plugins/system/t3/base-bs3/js/off-canvas.js
    plugins/system/t3/base-bs3/js/nav-collapse.js
Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 6 replies, has 3 voices, and was last updated by  Ninja Lead 8 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum