mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Code cleanup
This commit is contained in:
parent
bd23ac13eb
commit
78f6db52d5
1 changed files with 13 additions and 4 deletions
|
|
@ -3,7 +3,10 @@
|
|||
|
||||
{% set items = [] %}
|
||||
|
||||
{% set items = items|merge([{ path: path('sylius_shop_homepage'), label: 'sylius.ui.home'|trans }]) %}
|
||||
{% set items = items|merge([{
|
||||
path: path('sylius_shop_homepage'),
|
||||
label: 'sylius.ui.home'|trans
|
||||
}]) %}
|
||||
|
||||
{% if product.mainTaxon is not null %}
|
||||
{% set taxon = product.mainTaxon %}
|
||||
|
|
@ -13,19 +16,25 @@
|
|||
{% if ancestor.isRoot() or not ancestor.enabled %}
|
||||
{% set items = items|merge([{ label: ancestor.name }]) %}
|
||||
{% else %}
|
||||
{% set items = items|merge([{ path: path('sylius_shop_product_index', {'slug': ancestor.slug, '_locale': ancestor.translation.locale}), label: ancestor.name }]) %}
|
||||
{% set items = items|merge([{
|
||||
path: path('sylius_shop_product_index',{'slug': ancestor.slug, '_locale': ancestor.translation.locale}),
|
||||
label: ancestor.name }]) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if taxon.enabled %}
|
||||
{% set items = items|merge([{ path: path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}), label: taxon.name }]) %}
|
||||
{% set items = items|merge([{
|
||||
path: path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}),
|
||||
label: taxon.name }]) %}
|
||||
{% else %}
|
||||
{% set items = items|merge([{ label: taxon.name }]) %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if additional_items|length > 0 %}
|
||||
{% set items = items|merge([{ label: product.name, path: path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }]) %}
|
||||
{% set items = items|merge([{
|
||||
label: product.name,
|
||||
path: path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }]) %}
|
||||
{% else %}
|
||||
{% set items = items|merge([{ label: product.name, active: true }]) %}
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue