Prestashop 1.7菜单

时间:2019-03-13 16:35:36

标签: php prestashop prestashop-1.7

您好,在我的prestashop主题中,我想在与childs的链接中添加一个箭头。但在前端,箭头不是出现在链接之后,而是出现在链接上。

{assign var=_counter value=0} {function name="menu" nodes=[] depth=0parent=null} {if $nodes|count}
<ul class="top-menu" {if $depth==0 }id="top-menu" {/if} data-depth=".{$depth}">
{foreach from=$nodes item=node} {if $node.children}
<li class="{$node.type}{if $node.current} current {/if}" id="{$node.page_identifier}">
    <span><i class="material-icons">keyboard_arrow_down</i></span> {else}
    <li class="{$node.type}{if $node.current} current {/if}" id="{$node.page_identifier}">
        {/if} {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">&#xE313;</i>
                  <i class="material-icons remove">&#xE316;</i>
                </span>
              </span>
            {/if}
            {$node.label}
          </a> {if $node.children|count}
        <div {if $depth===0 } class="popover sub-menu js-sub-menu collapse menu-trans" {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" style="display: flex;">
{menu nodes=$menu.children}
<div class="clearfix"></div>

0 个答案:

没有答案