Prestashop 1.7 - Drop-down subcategories in top menu












0















I am using ps_mainmenu top menu with default Prestashop theme, but only performs the action of the drop-down menu with the parent category but not with the subcategories, as it appears in the attached image and the HTML code with Chrome. I would like to be able to display the menu of subcategories.



I think the solution is to add something like this line:






<div {if $depth === 1} class="top-menu collapse"{/if} id="top_sub_menu_{$_expand_id}">
{menu nodes=$node.children depth=$node.depth parent=$node.children}
</div>





Menu: https://ibb.co/eQAEnA



HTML menu: https://ibb.co/dWcYfV



This is my ps_mainmenu.tpl code:






{assign var=_counter value=0}
{function name="menu" nodes= depth=0 parent=null}
{if $nodes|count}
<ul class="top-menu" {if $depth == 0}id="top-menu"{/if} data-depth="{$depth}">
{foreach from=$nodes item=node}
<li class="{$node.type}{if $node.current} current {/if}" id="{$node.page_identifier}">
{assign var=_counter value=$_counter+1}
<a
class="{if $depth >= 0}dropdown-item{/if}{if $depth === 1} dropdown-submenu{/if}"
href="{$node.url}" data-depth="{$depth}"
{if $node.open_in_new_window} target="_blank" {/if}
>
{if $node.children|count}
{* Cannot use page identifier as we can have the same page several times *}
{assign var=_expand_id value=10|mt_rand:100000}
<span class="float-xs-right hidden-md-up">
<span data-target="#top_sub_menu_{$_expand_id}" data-toggle="collapse" class="navbar-toggler collapse-icons">
<i class="material-icons add"></i>
<i class="material-icons remove"></i>
</span>
</span>
{/if}
{$node.label}
</a>
{if $node.children|count}
<div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="collapse"{/if} id="top_sub_menu_{$_expand_id}">
{menu nodes=$node.children depth=$node.depth parent=$node}
</div>
{/if}
</li>
{/foreach}
</ul>
{/if}
{/function}

<div class="menu js-top-menu position-static hidden-sm-down" id="_desktop_top_menu">
{menu nodes=$menu.children}
<div class="clearfix"></div>
</div>





Thanks!










share|improve this question



























    0















    I am using ps_mainmenu top menu with default Prestashop theme, but only performs the action of the drop-down menu with the parent category but not with the subcategories, as it appears in the attached image and the HTML code with Chrome. I would like to be able to display the menu of subcategories.



    I think the solution is to add something like this line:






    <div {if $depth === 1} class="top-menu collapse"{/if} id="top_sub_menu_{$_expand_id}">
    {menu nodes=$node.children depth=$node.depth parent=$node.children}
    </div>





    Menu: https://ibb.co/eQAEnA



    HTML menu: https://ibb.co/dWcYfV



    This is my ps_mainmenu.tpl code:






    {assign var=_counter value=0}
    {function name="menu" nodes= depth=0 parent=null}
    {if $nodes|count}
    <ul class="top-menu" {if $depth == 0}id="top-menu"{/if} data-depth="{$depth}">
    {foreach from=$nodes item=node}
    <li class="{$node.type}{if $node.current} current {/if}" id="{$node.page_identifier}">
    {assign var=_counter value=$_counter+1}
    <a
    class="{if $depth >= 0}dropdown-item{/if}{if $depth === 1} dropdown-submenu{/if}"
    href="{$node.url}" data-depth="{$depth}"
    {if $node.open_in_new_window} target="_blank" {/if}
    >
    {if $node.children|count}
    {* Cannot use page identifier as we can have the same page several times *}
    {assign var=_expand_id value=10|mt_rand:100000}
    <span class="float-xs-right hidden-md-up">
    <span data-target="#top_sub_menu_{$_expand_id}" data-toggle="collapse" class="navbar-toggler collapse-icons">
    <i class="material-icons add"></i>
    <i class="material-icons remove"></i>
    </span>
    </span>
    {/if}
    {$node.label}
    </a>
    {if $node.children|count}
    <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="collapse"{/if} id="top_sub_menu_{$_expand_id}">
    {menu nodes=$node.children depth=$node.depth parent=$node}
    </div>
    {/if}
    </li>
    {/foreach}
    </ul>
    {/if}
    {/function}

    <div class="menu js-top-menu position-static hidden-sm-down" id="_desktop_top_menu">
    {menu nodes=$menu.children}
    <div class="clearfix"></div>
    </div>





    Thanks!










    share|improve this question

























      0












      0








      0








      I am using ps_mainmenu top menu with default Prestashop theme, but only performs the action of the drop-down menu with the parent category but not with the subcategories, as it appears in the attached image and the HTML code with Chrome. I would like to be able to display the menu of subcategories.



      I think the solution is to add something like this line:






      <div {if $depth === 1} class="top-menu collapse"{/if} id="top_sub_menu_{$_expand_id}">
      {menu nodes=$node.children depth=$node.depth parent=$node.children}
      </div>





      Menu: https://ibb.co/eQAEnA



      HTML menu: https://ibb.co/dWcYfV



      This is my ps_mainmenu.tpl code:






      {assign var=_counter value=0}
      {function name="menu" nodes= depth=0 parent=null}
      {if $nodes|count}
      <ul class="top-menu" {if $depth == 0}id="top-menu"{/if} data-depth="{$depth}">
      {foreach from=$nodes item=node}
      <li class="{$node.type}{if $node.current} current {/if}" id="{$node.page_identifier}">
      {assign var=_counter value=$_counter+1}
      <a
      class="{if $depth >= 0}dropdown-item{/if}{if $depth === 1} dropdown-submenu{/if}"
      href="{$node.url}" data-depth="{$depth}"
      {if $node.open_in_new_window} target="_blank" {/if}
      >
      {if $node.children|count}
      {* Cannot use page identifier as we can have the same page several times *}
      {assign var=_expand_id value=10|mt_rand:100000}
      <span class="float-xs-right hidden-md-up">
      <span data-target="#top_sub_menu_{$_expand_id}" data-toggle="collapse" class="navbar-toggler collapse-icons">
      <i class="material-icons add"></i>
      <i class="material-icons remove"></i>
      </span>
      </span>
      {/if}
      {$node.label}
      </a>
      {if $node.children|count}
      <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="collapse"{/if} id="top_sub_menu_{$_expand_id}">
      {menu nodes=$node.children depth=$node.depth parent=$node}
      </div>
      {/if}
      </li>
      {/foreach}
      </ul>
      {/if}
      {/function}

      <div class="menu js-top-menu position-static hidden-sm-down" id="_desktop_top_menu">
      {menu nodes=$menu.children}
      <div class="clearfix"></div>
      </div>





      Thanks!










      share|improve this question














      I am using ps_mainmenu top menu with default Prestashop theme, but only performs the action of the drop-down menu with the parent category but not with the subcategories, as it appears in the attached image and the HTML code with Chrome. I would like to be able to display the menu of subcategories.



      I think the solution is to add something like this line:






      <div {if $depth === 1} class="top-menu collapse"{/if} id="top_sub_menu_{$_expand_id}">
      {menu nodes=$node.children depth=$node.depth parent=$node.children}
      </div>





      Menu: https://ibb.co/eQAEnA



      HTML menu: https://ibb.co/dWcYfV



      This is my ps_mainmenu.tpl code:






      {assign var=_counter value=0}
      {function name="menu" nodes= depth=0 parent=null}
      {if $nodes|count}
      <ul class="top-menu" {if $depth == 0}id="top-menu"{/if} data-depth="{$depth}">
      {foreach from=$nodes item=node}
      <li class="{$node.type}{if $node.current} current {/if}" id="{$node.page_identifier}">
      {assign var=_counter value=$_counter+1}
      <a
      class="{if $depth >= 0}dropdown-item{/if}{if $depth === 1} dropdown-submenu{/if}"
      href="{$node.url}" data-depth="{$depth}"
      {if $node.open_in_new_window} target="_blank" {/if}
      >
      {if $node.children|count}
      {* Cannot use page identifier as we can have the same page several times *}
      {assign var=_expand_id value=10|mt_rand:100000}
      <span class="float-xs-right hidden-md-up">
      <span data-target="#top_sub_menu_{$_expand_id}" data-toggle="collapse" class="navbar-toggler collapse-icons">
      <i class="material-icons add"></i>
      <i class="material-icons remove"></i>
      </span>
      </span>
      {/if}
      {$node.label}
      </a>
      {if $node.children|count}
      <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="collapse"{/if} id="top_sub_menu_{$_expand_id}">
      {menu nodes=$node.children depth=$node.depth parent=$node}
      </div>
      {/if}
      </li>
      {/foreach}
      </ul>
      {/if}
      {/function}

      <div class="menu js-top-menu position-static hidden-sm-down" id="_desktop_top_menu">
      {menu nodes=$menu.children}
      <div class="clearfix"></div>
      </div>





      Thanks!






      <div {if $depth === 1} class="top-menu collapse"{/if} id="top_sub_menu_{$_expand_id}">
      {menu nodes=$node.children depth=$node.depth parent=$node.children}
      </div>





      <div {if $depth === 1} class="top-menu collapse"{/if} id="top_sub_menu_{$_expand_id}">
      {menu nodes=$node.children depth=$node.depth parent=$node.children}
      </div>





      {assign var=_counter value=0}
      {function name="menu" nodes= depth=0 parent=null}
      {if $nodes|count}
      <ul class="top-menu" {if $depth == 0}id="top-menu"{/if} data-depth="{$depth}">
      {foreach from=$nodes item=node}
      <li class="{$node.type}{if $node.current} current {/if}" id="{$node.page_identifier}">
      {assign var=_counter value=$_counter+1}
      <a
      class="{if $depth >= 0}dropdown-item{/if}{if $depth === 1} dropdown-submenu{/if}"
      href="{$node.url}" data-depth="{$depth}"
      {if $node.open_in_new_window} target="_blank" {/if}
      >
      {if $node.children|count}
      {* Cannot use page identifier as we can have the same page several times *}
      {assign var=_expand_id value=10|mt_rand:100000}
      <span class="float-xs-right hidden-md-up">
      <span data-target="#top_sub_menu_{$_expand_id}" data-toggle="collapse" class="navbar-toggler collapse-icons">
      <i class="material-icons add"></i>
      <i class="material-icons remove"></i>
      </span>
      </span>
      {/if}
      {$node.label}
      </a>
      {if $node.children|count}
      <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="collapse"{/if} id="top_sub_menu_{$_expand_id}">
      {menu nodes=$node.children depth=$node.depth parent=$node}
      </div>
      {/if}
      </li>
      {/foreach}
      </ul>
      {/if}
      {/function}

      <div class="menu js-top-menu position-static hidden-sm-down" id="_desktop_top_menu">
      {menu nodes=$menu.children}
      <div class="clearfix"></div>
      </div>





      {assign var=_counter value=0}
      {function name="menu" nodes= depth=0 parent=null}
      {if $nodes|count}
      <ul class="top-menu" {if $depth == 0}id="top-menu"{/if} data-depth="{$depth}">
      {foreach from=$nodes item=node}
      <li class="{$node.type}{if $node.current} current {/if}" id="{$node.page_identifier}">
      {assign var=_counter value=$_counter+1}
      <a
      class="{if $depth >= 0}dropdown-item{/if}{if $depth === 1} dropdown-submenu{/if}"
      href="{$node.url}" data-depth="{$depth}"
      {if $node.open_in_new_window} target="_blank" {/if}
      >
      {if $node.children|count}
      {* Cannot use page identifier as we can have the same page several times *}
      {assign var=_expand_id value=10|mt_rand:100000}
      <span class="float-xs-right hidden-md-up">
      <span data-target="#top_sub_menu_{$_expand_id}" data-toggle="collapse" class="navbar-toggler collapse-icons">
      <i class="material-icons add"></i>
      <i class="material-icons remove"></i>
      </span>
      </span>
      {/if}
      {$node.label}
      </a>
      {if $node.children|count}
      <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="collapse"{/if} id="top_sub_menu_{$_expand_id}">
      {menu nodes=$node.children depth=$node.depth parent=$node}
      </div>
      {/if}
      </li>
      {/foreach}
      </ul>
      {/if}
      {/function}

      <div class="menu js-top-menu position-static hidden-sm-down" id="_desktop_top_menu">
      {menu nodes=$menu.children}
      <div class="clearfix"></div>
      </div>






      php html css bootstrap-4 prestashop






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '18 at 10:33









      AlbertoAlberto

      1




      1
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Solution:



          Modify this line in ps_mainmenu.tpl:






          <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="js-sub-menu sub-menu2 collapse"{/if} id="top_sub_menu_{$_expand_id}">
          {menu nodes=$node.children depth=$node.depth parent=$node}
          </div>





          And add this class in theme.css:






          .top-menu[data-depth="1"] li:hover .sub-menu2  {
            display: block!important;
          }
          .top-menu .sub-menu2 ul[data-depth="2"]>li {
          float: left;
          margin: 0 1.25rem;
          }
          .top-menu .sub-menu2.collapse {
          position: absolute;
          top: auto!important;
          display: none;
          float: left;
          zoom: 1;
          z-index: 10;
          margin: 0 0 40px -1px;
          -webkit-border-radius: 0 0 3px 3px;
          -moz-border-radius: 0 0 3px 3px;
          border-radius: 0 0 3px 3px;
          -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
          -o-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
          border-top: none;
          color: #212121;
          background: -moz-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
          background: -webkit-gradient(left top, left bottom, color-stop(0, #e2e2e2), color-stop(22%, #fff), color-stop(100%, #fff));
          background: -webkit-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
          background: -o-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
          background: -ms-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
          background: linear-gradient(to bottom, #e2e2e2 0, #fff 22%, #fff 100%);
          filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#ffffff', GradientType=0 );
          }
          .top-menu .sub-menu2 {
          box-shadow: 2px 1px 11px 2px rgba(0, 0, 0, .1);
          border: none;
          margin-left: .9375rem;
          width: calc(100% - 30px);
          min-width: calc(100% - 30px);
          z-index: 18;
          display: none;








          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53410148%2fprestashop-1-7-drop-down-subcategories-in-top-menu%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Solution:



            Modify this line in ps_mainmenu.tpl:






            <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="js-sub-menu sub-menu2 collapse"{/if} id="top_sub_menu_{$_expand_id}">
            {menu nodes=$node.children depth=$node.depth parent=$node}
            </div>





            And add this class in theme.css:






            .top-menu[data-depth="1"] li:hover .sub-menu2  {
              display: block!important;
            }
            .top-menu .sub-menu2 ul[data-depth="2"]>li {
            float: left;
            margin: 0 1.25rem;
            }
            .top-menu .sub-menu2.collapse {
            position: absolute;
            top: auto!important;
            display: none;
            float: left;
            zoom: 1;
            z-index: 10;
            margin: 0 0 40px -1px;
            -webkit-border-radius: 0 0 3px 3px;
            -moz-border-radius: 0 0 3px 3px;
            border-radius: 0 0 3px 3px;
            -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
            -o-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
            border-top: none;
            color: #212121;
            background: -moz-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
            background: -webkit-gradient(left top, left bottom, color-stop(0, #e2e2e2), color-stop(22%, #fff), color-stop(100%, #fff));
            background: -webkit-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
            background: -o-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
            background: -ms-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
            background: linear-gradient(to bottom, #e2e2e2 0, #fff 22%, #fff 100%);
            filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#ffffff', GradientType=0 );
            }
            .top-menu .sub-menu2 {
            box-shadow: 2px 1px 11px 2px rgba(0, 0, 0, .1);
            border: none;
            margin-left: .9375rem;
            width: calc(100% - 30px);
            min-width: calc(100% - 30px);
            z-index: 18;
            display: none;








            share|improve this answer




























              0














              Solution:



              Modify this line in ps_mainmenu.tpl:






              <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="js-sub-menu sub-menu2 collapse"{/if} id="top_sub_menu_{$_expand_id}">
              {menu nodes=$node.children depth=$node.depth parent=$node}
              </div>





              And add this class in theme.css:






              .top-menu[data-depth="1"] li:hover .sub-menu2  {
                display: block!important;
              }
              .top-menu .sub-menu2 ul[data-depth="2"]>li {
              float: left;
              margin: 0 1.25rem;
              }
              .top-menu .sub-menu2.collapse {
              position: absolute;
              top: auto!important;
              display: none;
              float: left;
              zoom: 1;
              z-index: 10;
              margin: 0 0 40px -1px;
              -webkit-border-radius: 0 0 3px 3px;
              -moz-border-radius: 0 0 3px 3px;
              border-radius: 0 0 3px 3px;
              -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
              -o-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
              border-top: none;
              color: #212121;
              background: -moz-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
              background: -webkit-gradient(left top, left bottom, color-stop(0, #e2e2e2), color-stop(22%, #fff), color-stop(100%, #fff));
              background: -webkit-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
              background: -o-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
              background: -ms-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
              background: linear-gradient(to bottom, #e2e2e2 0, #fff 22%, #fff 100%);
              filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#ffffff', GradientType=0 );
              }
              .top-menu .sub-menu2 {
              box-shadow: 2px 1px 11px 2px rgba(0, 0, 0, .1);
              border: none;
              margin-left: .9375rem;
              width: calc(100% - 30px);
              min-width: calc(100% - 30px);
              z-index: 18;
              display: none;








              share|improve this answer


























                0












                0








                0







                Solution:



                Modify this line in ps_mainmenu.tpl:






                <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="js-sub-menu sub-menu2 collapse"{/if} id="top_sub_menu_{$_expand_id}">
                {menu nodes=$node.children depth=$node.depth parent=$node}
                </div>





                And add this class in theme.css:






                .top-menu[data-depth="1"] li:hover .sub-menu2  {
                  display: block!important;
                }
                .top-menu .sub-menu2 ul[data-depth="2"]>li {
                float: left;
                margin: 0 1.25rem;
                }
                .top-menu .sub-menu2.collapse {
                position: absolute;
                top: auto!important;
                display: none;
                float: left;
                zoom: 1;
                z-index: 10;
                margin: 0 0 40px -1px;
                -webkit-border-radius: 0 0 3px 3px;
                -moz-border-radius: 0 0 3px 3px;
                border-radius: 0 0 3px 3px;
                -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
                -o-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
                border-top: none;
                color: #212121;
                background: -moz-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -webkit-gradient(left top, left bottom, color-stop(0, #e2e2e2), color-stop(22%, #fff), color-stop(100%, #fff));
                background: -webkit-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -o-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -ms-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: linear-gradient(to bottom, #e2e2e2 0, #fff 22%, #fff 100%);
                filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#ffffff', GradientType=0 );
                }
                .top-menu .sub-menu2 {
                box-shadow: 2px 1px 11px 2px rgba(0, 0, 0, .1);
                border: none;
                margin-left: .9375rem;
                width: calc(100% - 30px);
                min-width: calc(100% - 30px);
                z-index: 18;
                display: none;








                share|improve this answer













                Solution:



                Modify this line in ps_mainmenu.tpl:






                <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="js-sub-menu sub-menu2 collapse"{/if} id="top_sub_menu_{$_expand_id}">
                {menu nodes=$node.children depth=$node.depth parent=$node}
                </div>





                And add this class in theme.css:






                .top-menu[data-depth="1"] li:hover .sub-menu2  {
                  display: block!important;
                }
                .top-menu .sub-menu2 ul[data-depth="2"]>li {
                float: left;
                margin: 0 1.25rem;
                }
                .top-menu .sub-menu2.collapse {
                position: absolute;
                top: auto!important;
                display: none;
                float: left;
                zoom: 1;
                z-index: 10;
                margin: 0 0 40px -1px;
                -webkit-border-radius: 0 0 3px 3px;
                -moz-border-radius: 0 0 3px 3px;
                border-radius: 0 0 3px 3px;
                -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
                -o-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
                border-top: none;
                color: #212121;
                background: -moz-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -webkit-gradient(left top, left bottom, color-stop(0, #e2e2e2), color-stop(22%, #fff), color-stop(100%, #fff));
                background: -webkit-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -o-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -ms-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: linear-gradient(to bottom, #e2e2e2 0, #fff 22%, #fff 100%);
                filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#ffffff', GradientType=0 );
                }
                .top-menu .sub-menu2 {
                box-shadow: 2px 1px 11px 2px rgba(0, 0, 0, .1);
                border: none;
                margin-left: .9375rem;
                width: calc(100% - 30px);
                min-width: calc(100% - 30px);
                z-index: 18;
                display: none;








                <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="js-sub-menu sub-menu2 collapse"{/if} id="top_sub_menu_{$_expand_id}">
                {menu nodes=$node.children depth=$node.depth parent=$node}
                </div>





                <div {if $depth === 0} class="popover sub-menu js-sub-menu collapse"{else} class="js-sub-menu sub-menu2 collapse"{/if} id="top_sub_menu_{$_expand_id}">
                {menu nodes=$node.children depth=$node.depth parent=$node}
                </div>





                .top-menu[data-depth="1"] li:hover .sub-menu2  {
                  display: block!important;
                }
                .top-menu .sub-menu2 ul[data-depth="2"]>li {
                float: left;
                margin: 0 1.25rem;
                }
                .top-menu .sub-menu2.collapse {
                position: absolute;
                top: auto!important;
                display: none;
                float: left;
                zoom: 1;
                z-index: 10;
                margin: 0 0 40px -1px;
                -webkit-border-radius: 0 0 3px 3px;
                -moz-border-radius: 0 0 3px 3px;
                border-radius: 0 0 3px 3px;
                -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
                -o-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
                border-top: none;
                color: #212121;
                background: -moz-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -webkit-gradient(left top, left bottom, color-stop(0, #e2e2e2), color-stop(22%, #fff), color-stop(100%, #fff));
                background: -webkit-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -o-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -ms-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: linear-gradient(to bottom, #e2e2e2 0, #fff 22%, #fff 100%);
                filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#ffffff', GradientType=0 );
                }
                .top-menu .sub-menu2 {
                box-shadow: 2px 1px 11px 2px rgba(0, 0, 0, .1);
                border: none;
                margin-left: .9375rem;
                width: calc(100% - 30px);
                min-width: calc(100% - 30px);
                z-index: 18;
                display: none;





                .top-menu[data-depth="1"] li:hover .sub-menu2  {
                  display: block!important;
                }
                .top-menu .sub-menu2 ul[data-depth="2"]>li {
                float: left;
                margin: 0 1.25rem;
                }
                .top-menu .sub-menu2.collapse {
                position: absolute;
                top: auto!important;
                display: none;
                float: left;
                zoom: 1;
                z-index: 10;
                margin: 0 0 40px -1px;
                -webkit-border-radius: 0 0 3px 3px;
                -moz-border-radius: 0 0 3px 3px;
                border-radius: 0 0 3px 3px;
                -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
                -o-box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
                border-top: none;
                color: #212121;
                background: -moz-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -webkit-gradient(left top, left bottom, color-stop(0, #e2e2e2), color-stop(22%, #fff), color-stop(100%, #fff));
                background: -webkit-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -o-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: -ms-linear-gradient(top, #e2e2e2 0, #fff 22%, #fff 100%);
                background: linear-gradient(to bottom, #e2e2e2 0, #fff 22%, #fff 100%);
                filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#ffffff', GradientType=0 );
                }
                .top-menu .sub-menu2 {
                box-shadow: 2px 1px 11px 2px rgba(0, 0, 0, .1);
                border: none;
                margin-left: .9375rem;
                width: calc(100% - 30px);
                min-width: calc(100% - 30px);
                z-index: 18;
                display: none;






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 21 '18 at 12:40









                AlbertoAlberto

                1




                1
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53410148%2fprestashop-1-7-drop-down-subcategories-in-top-menu%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    'app-layout' is not a known element: how to share Component with different Modules

                    android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

                    WPF add header to Image with URL pettitions [duplicate]