Jump to content

How to add more tabs on homepage instead of showing tab 'More' with the choosen category's


PapaBearTango

Recommended Posts

11 minutes ago, juanrojas said:

Hello, why does Prestashop not let you? does it give you any error?
have you looked at the menu module?

Yes I have looked. I can add category's. But then it shows under "More". If I remove one more category. The tab "more" is gone. 

Link to comment
Share on other sites

On 7/31/2022 at 1:39 PM, juanrojas said:

I need a lot of faith to see it

image.thumb.png.271120b28b02f780984daa08cd0a51bc.png

{assign var=_counter value=0}
{function name="menu" nodes=[] depth=0 parent=null}
    {if $nodes|count}
      <ul class="top-menu  {if $depth == 0}container{/if}" {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="pull-xs-right hidden-lg-up">
                    <span data-target="#top_sub_menu_{$_expand_id}" data-toggle="collapse" class="navbar-toggler collapse-icons">
                      <i class="fa-icon add">&nbsp;</i>
                      <i class="fa-icon remove">&nbsp;</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}
                  {if $node.image_urls}
                    <div class="menu-banners">
                      {foreach from=$node.image_urls item=image_url}
                        <div class="menu-banner">
                            <img src="{$image_url}" alt="" />
                        </div>
                      {/foreach}
                    </div>
                {/if}
              </div>
              {/if}
            </li>
        {/foreach}
      </ul>
    {/if}
{/function}


<div class="text-xs-left mobile hidden-lg-up mobile-menu">
    <div class="menu-icon">
        <div class="cat-title">{l s='Menu' d='Shop.Theme.Global'}</div>          
    </div>
    
    <div id="mobile_top_menu_wrapper" class="row hidden-lg-up">
        <div class="mobile-menu-inner">
            <div class="menu-icon">
                <div class="cat-title">{l s='Menu' d='Shop.Theme.Global'}</div>          
            </div>
            <div class="js-top-menu mobile" id="_mobile_top_menu"></div>
        </div>
    </div>
</div>

 
<div class="menu col-lg-12 js-top-menu position-static hidden-md-down" id="_desktop_top_menu">
    {menu nodes=$menu.children}
</div>

 

I hope this helps for you? 

image.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...