Php 如何从Magento标题中的top.links中删除链接?
我目前正在使用Magento 2.2,并安装了一个marketplace模块,在标题下拉列表中添加了一个“销售”链接。此标题下拉列表调用“top.links”,如下所示:Php 如何从Magento标题中的top.links中删除链接?,php,xml,magento,magento2,Php,Xml,Magento,Magento2,我目前正在使用Magento 2.2,并安装了一个marketplace模块,在标题下拉列表中添加了一个“销售”链接。此标题下拉列表调用“top.links”,如下所示: <div class="dropdown dropdown-toplinks"> <button class="dropdown-toggle" type="button" data-toggle="dropdown"><i class="pe-7s-use
<div class="dropdown dropdown-toplinks">
<button class="dropdown-toggle" type="button" data-toggle="dropdown"><i class="pe-7s-user"></i></button>
<div class="dropdown-menu">
<?php echo $block->getChildHtml('top.links') ?>
</div>
</div>
在我的default.xml文件中,包含以下链接:
<referenceBlock name="advanced-search-link" remove="true"/>
<referenceBlock name="skip_to_content" remove="true"/>
<referenceBlock name="authentication-popup" remove="true"/>
<referenceBlock name="navigation.sections" remove="true"/>
我找不到top.links文件,它似乎不存在。有没有办法只删除单一的“销售”链接?(存在的其他链接是我的帐户、登录、我的愿望列表) 将其添加到您的
default.xml
文件中
<referenceBlock name="top.links">
<referenceBlock name="register-link" remove="true" /> <!--for Create Account Link-->
<referenceBlock name="authorization-link" remove="true" /> <!--for Sign In Link -->
<referenceBlock name="wish-list-link" remove="true" /> <!--for WishList Link-->
<referenceBlock name="my-account-link" remove="true" /> <!--for My Account Link-->
</referenceBlock>
如何重新排列顶部链接下拉列表中的链接?