谁能告诉我如何在客户帐户部分中创建自定义标签。
我尝试使用替换默认的 myaccount.twig 文件。我不知道这是正确的方法。
先谢谢了...!
{{ header }}
<div id="account-account" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
{% if success %}
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}</div>
{% endif %}
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h2>{{ text_my_account }}</h2>
<ul class="list-unstyled">
<li><a href="{{ edit }}">{{ text_edit }}</a></li>
<li><a href="{{ password }}">{{ text_password }}</a></li>
<li><a href="{{ address }}">{{ text_address }}</a></li>
<li><a href="{{ wishlist }}">{{ text_wishlist }}</a></li>
</ul>
{% if credit_cards %}
<h2>{{ text_credit_card }}</h2>
<ul class="list-unstyled">
{% for credit_card in credit_cards %}
<li><a href="{{ credit_card.href }}">{{ credit_card.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
<h2>{{ text_my_orders }}</h2>
<ul class="list-unstyled">
<li><a href="{{ order }}">{{ text_order }}</a></li>
<li><a href="{{ download }}">{{ text_download }}</a></li>
{% if reward %}
<li><a href="{{ reward }}">{{ text_reward }}</a></li>
{% endif %}
<li><a href="{{ return }}">{{ text_return }}</a></li>
<li><a href="{{ transaction }}">{{ text_transaction }}</a></li>
<li><a href="{{ recurring }}">{{ text_recurring }}</a></li>
</ul>
<h2>{{ text_my_affiliate }}</h2>
<ul class="list-unstyled">
{% if not tracking %}
<li><a href="{{ affiliate }}">{{ text_affiliate_add }}</a></li>
{% else %}
<li><a href="{{ affiliate }}">{{ text_affiliate_edit }}</a></li>
<li><a href="{{ tracking }}">{{ text_tracking }}</a></li>
{% endif %}
</ul>
<h2>{{ text_my_newsletter }}</h2>
<ul class="list-unstyled">
<li><a href="{{ newsletter }}">{{ text_newsletter }}</a></li>
</ul>
<h2>{{ text_my_title }}</h2>
<ul class="list-unstyled">
<li><a href="{{ myurl }}">{{ text_url }}</a></li>
</ul>
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
以上代码是默认的account.twig文件,其中我仅添加了我的代码
<h2>{{ text_my_title }}</h2>
<ul class="list-unstyled">
<li><a href="{{ myurl }}">{{ text_url }}</a></li>
</ul>
所以这是正确的方法吗?该代码有效,但是当我取消安装此模块时,它将删除默认的account.twig文件。
请在此情况下引导我。预先谢谢...!