Добрый день.
Не могу найти причину повторения ссылки на раздел магазина в крошках : Главная - Магазин - Раздел -
Раздел - Товар
Все макеты и коды стандартные. Быть может кто-то сталкивался с таким?
XSL
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:hostcms="http://www.hostcms.ru/"
exclude-result-prefixes="hostcms">
<xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="utf-8" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml"/>
<!-- Хлебные крошки -->
<xsl:template match="/site">
<xsl:if test="count(*[@id][link != '/'])">
<div xmlns:v="http://rdf.data-vocabulary.org/#" class="breadcrumbs">
<span typeof="v:Breadcrumb">
<a href="/" property="v:title" rel="v:url">Главная</a>
</span>
<xsl:apply-templates select="*[@id][link != '/']" />
</div>
</xsl:if>
</xsl:template>
<xsl:template match="*">
<!-- Set $link variable -->
<xsl:variable name="link">
<xsl:choose>
<!-- Если внутренняя ссылка -->
<xsl:when test="link != ''">
<xsl:value-of disable-output-escaping="yes" select="link"/>
</xsl:when>
<!-- External link -->
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="url"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<i class="fa fa-angle-right"></i>
<!-- Показывать ссылку? -->
<xsl:choose>
<xsl:when test="(show = 1 or active/node() and active = 1) and count(*[@id][link/node() or url/node()]) > 0">
<span typeof="v:Breadcrumb">
<a title="{name}" href="{$link}" property="v:title" rel="v:url">
<xsl:value-of select="name"/>
</a>
</span>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="name"/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*[@id][link/node() or url/node()]" />
</xsl:template>
</xsl:stylesheet>
Выводим крошки в макете
<?php
// Вывод строки навигации
$Structure_Controller_Breadcrumbs = new Structure_Controller_Breadcrumbs(
Core_Entity::factory('Site', CURRENT_SITE)
);
$Structure_Controller_Breadcrumbs
->xsl(
Core_Entity::factory('Xsl')->getByName('ХлебныеКрошкиСайт2')
)
->showProperties(true)
->show();
?>