OpenCart
- 1 ответ
- 0 вопросов
0
Вклад в тег
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<code>breadcrumblist_json</code>
<name><![CDATA[BreadcrumbList ld+json OC 3.0.x]]></name>
<version><![CDATA[1.0]]></version>
<author><![CDATA[AlexSF]]></author>
<date><![CDATA[2020.03.04]]></date>
<file path='catalog/language/ru-ru/ru-ru.php'>
<operation info='Fix for Font Awesome'>
<search><![CDATA[
<i class="fa fa-home"></i>
]]></search>
<add position='replace'><![CDATA[<i class="fa fa-home"></i><span style="display:none">Главная</span>]]></add>
</operation>
</file>
<file path='catalog/view/theme/*/template/{product,information,checkout,account}/*.twig'>
<operation error="skip">
<search><![CDATA[
<ul class="breadcrumb">
]]></search>
<add position="before"><![CDATA[
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement":
[
{% for key,breadcrumb in breadcrumbs %}
{
"@type": "ListItem",
"position": {{ key+1 }},
"item":
{
"@id": "{{ breadcrumb['href'] }}",
"name": "{{ breadcrumb['text']|striptags }}"
}
{% if loop.last == false %}
},
{% else %}
}
{% endif %}
{% endfor %}
]
}
</script>
]]></add>
</operation>
</file>
</modification>