小编Kll*_*ee 的帖子

更改 header.links 上的“创建帐户”文本?

想将“创建帐户”文本更改为“注册”,文本前带有图像标签,但我无法通过Magento_Customer/layout/default.xml的以下修改来更新文本。

<referenceBlock name="register-link">
    <arguments>
        <argument name="label" xsi:type="string" translate="true">Register</argument>
    </arguments>
</referenceBlock>
<referenceBlock name="my-account-link" display="false" />
    <!--
    <move element="register-link" destination="header.links"/>
    <move element="header" destination="header.links" before="-"/>
    <move element="top.links" destination="customer"/>
    <move element="authorization-link" destination="top.links" after="-"/>
    -->


    <block
        class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link"
        template="account/link/authorization.phtml" before="register-link"/>
</referenceBlock>
<block class="Magento\Theme\Block\Html\Header" name="header" as="header">
    <!--
    <arguments>
        <argument name="show_part" xsi:type="string">welcome</argument>
    </arguments>
    -->
</block> 
Run Code Online (Sandbox Code Playgroud)

我的错是什么?

layout magento2

4
推荐指数
1
解决办法
4613
查看次数

标签 统计

layout ×1

magento2 ×1