Хлебные крошки на странице элемента ИС
Здравствуйте, подскажите такой вопрос, не выводятся хлебные крошки на детальной странице ИС, в xml дынные следующие
в xsl шаблоне такой код
как вы вести эти хлебные крошки в чем тут ошибка?
<informationsystem id="22">
<informationsystem_dir_id>0</informationsystem_dir_id>
<structure_id>159</structure_id>
<site_id>2</site_id>
<name>Продукция</name>
<description></description>
<items_sorting_direction>0</items_sorting_direction>
<items_sorting_field>2</items_sorting_field>
<groups_sorting_direction>0</groups_sorting_direction>
<groups_sorting_field>1</groups_sorting_field>
<image_large_max_width>500</image_large_max_width>
<image_large_max_height>500</image_large_max_height>
<image_small_max_width>150</image_small_max_width>
<image_small_max_height>150</image_small_max_height>
<siteuser_group_id>0</siteuser_group_id>
<use_captcha>1</use_captcha>
<watermark_file></watermark_file>
<watermark_default_use_large_image>0</watermark_default_use_large_image>
<watermark_default_use_small_image>0</watermark_default_use_small_image>
<watermark_default_position_x>50%</watermark_default_position_x>
<watermark_default_position_y>100%</watermark_default_position_y>
<user_id>19</user_id>
<items_on_page>99</items_on_page>
<format_date>%d.%m.%Y</format_date>
<format_datetime>%d.%m.%Y %H:%M:%S</format_datetime>
<url_type>0</url_type>
<typograph_default_items>0</typograph_default_items>
<typograph_default_groups>0</typograph_default_groups>
<apply_tags_automatically>0</apply_tags_automatically>
<change_filename>1</change_filename>
<apply_keywords_automatically>0</apply_keywords_automatically>
<group_image_large_max_width>500</group_image_large_max_width>
<group_image_large_max_height>500</group_image_large_max_height>
<group_image_small_max_width>150</group_image_small_max_width>
<group_image_small_max_height>150</group_image_small_max_height>
<preserve_aspect_ratio>1</preserve_aspect_ratio>
<preserve_aspect_ratio_small>1</preserve_aspect_ratio_small>
<preserve_aspect_ratio_group>1</preserve_aspect_ratio_group>
<preserve_aspect_ratio_group_small>1</preserve_aspect_ratio_group_small>
<seo_group_title_template></seo_group_title_template>
<seo_group_keywords_template></seo_group_keywords_template>
<seo_group_description_template></seo_group_description_template>
<seo_item_title_template></seo_item_title_template>
<seo_item_keywords_template></seo_item_keywords_template>
<seo_item_description_template></seo_item_description_template>
<http>//www.artoprint.ru</http>
<url>/produkciya/</url>
<captcha_id>69930</captcha_id>
<siteuser_id>0</siteuser_id>
<ОтображатьСсылкуНаАрхив>0</ОтображатьСсылкуНаАрхив>
<ОтображатьСсылкиНаСледующиеСтраницы>1</ОтображатьСсылкиНаСледующиеСтраницы>
<ТекущаяГруппа>55</ТекущаяГруппа>
<show_comments>0</show_comments>
<show_add_comments>0</show_add_comments>
<group>55</group>
<page>0</page>
<part>0</part>
<limit>99</limit>
<informationsystem_group id="55">
<informationsystem_id>22</informationsystem_id>
<siteuser_id>0</siteuser_id>
<parent_id>0</parent_id>
<name>Календари</name>
<description></description>
<sorting>70</sorting>
<path>calendars</path>
<image_large></image_large>
<image_small>small_group_55.png</image_small>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>3</items_count>
<items_total_count>3</items_total_count>
<seo_title>Календари | Изготовление товаров из раздела: Календари в Москве</seo_title>
<seo_description>Предлагаем вам ознакомиться с продукцией, представленной в каталоге Календари.</seo_description>
<seo_keywords></seo_keywords>
<seo_group_title_template></seo_group_title_template>
<seo_group_keywords_template></seo_group_keywords_template>
<seo_group_description_template></seo_group_description_template>
<seo_item_title_template></seo_item_title_template>
<seo_item_keywords_template></seo_item_keywords_template>
<seo_item_description_template></seo_item_description_template>
<siteuser_group_id>-1</siteuser_group_id>
<active>1</active>
<user_id>19</user_id>
<guid>D357021E-5A5C-4078-C6C2-861AFABF1C14</guid>
<sns_type_id>0</sns_type_id>
<url>/produkciya/calendars/</url>
<dir>/upload/information_system_22/0/5/5/group_55/</dir>
</informationsystem_group>
<informationsystem_item_properties>
<property id="85">
<property_dir_id>0</property_dir_id>
<list_id>0</list_id>
<informationsystem_id>0</informationsystem_id>
<shop_id>0</shop_id>
<name>h1</name>
<description></description>
<type>1</type>
<default_value></default_value>
<tag_name>h1</tag_name>
<sorting>0</sorting>
<guid>9339A6FA-0BAF-8F69-23F0-0248E2FEF641</guid>
<multiple>0</multiple>
<user_id>19</user_id>
</property>
<property id="88">
<property_dir_id>0</property_dir_id>
<list_id>0</list_id>
<informationsystem_id>0</informationsystem_id>
<shop_id>0</shop_id>
<name>Цена</name>
<description></description>
<type>1</type>
<default_value></default_value>
<tag_name>item_price</tag_name>
<sorting>0</sorting>
<guid>FFBD6F4A-89F1-9741-5A2E-30DF7A64033C</guid>
<multiple>1</multiple>
<user_id>19</user_id>
</property>
<property id="89">
<property_dir_id>0</property_dir_id>
<list_id>0</list_id>
<informationsystem_id>0</informationsystem_id>
<shop_id>0</shop_id>
<name>Характеристика 1</name>
<description></description>
<type>1</type>
<default_value></default_value>
<tag_name>option_1</tag_name>
<sorting>0</sorting>
<guid>2A3E505D-A0F3-1ED9-A551-C6A761B51144</guid>
<multiple>1</multiple>
<user_id>19</user_id>
</property>
<property id="90">
<property_dir_id>0</property_dir_id>
<list_id>0</list_id>
<informationsystem_id>0</informationsystem_id>
<shop_id>0</shop_id>
<name>Характеристика 2</name>
<description></description>
<type>1</type>
<default_value></default_value>
<tag_name>option_2</tag_name>
<sorting>0</sorting>
<guid>4F8FFEE2-96A0-1F91-A0B7-55FE3358D205</guid>
<multiple>1</multiple>
<user_id>19</user_id>
</property>
</informationsystem_item_properties>
<informationsystem_item id="348">
<informationsystem_id>22</informationsystem_id>
<informationsystem_group_id>55</informationsystem_group_id>
<shortcut_id>0</shortcut_id>
<name>Календарь "домик" 160х140х100</name>
<description></description>
<active>1</active>
<text><div>
<table border="1" cellpadding="5" cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td>Формат основы:</td>
<td>Д160хВ140хШ100 мм</td>
</tr>
<tr>
<td>Формат листов блока:</td>
<td>160х140 мм</td>
</tr>
<tr>
<td>Количество перекидных листов:</td>
<td>13 листов</td>
</tr>
<tr>
<td>Бумага на ножку:</td>
<td>325 гр односторонний картон</td>
</tr>
<tr>
<td>Бумага на перекидные листы:</td>
<td>250 гр мелованная матовая</td>
</tr>
<tr>
<td>Цветность ножки:</td>
<td>0+0 (без печати)</td>
</tr>
<tr>
<td>Цветность перекидных листов:</td>
<td>4+4 (cmyk)</td>
</tr>
<tr>
<td>Послепечатные работы:</td>
<td>гл. ламинация ноги, 3 бига ножки, навивка белой пружиной по стороне 160 мм, упаковка в термоусадочную плёнку прозрачного цвета</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="5" cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td style="width: 200px;">Нога</td>
<td>380</td>
<td>380*160</td>
</tr>
</tbody>
</table>
<br />
<table border="1" cellpadding="5" cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td style="width: 200px;">Тираж</td>
<td>25</td>
<td>50</td>
<td>100</td>
<td>150</td>
<td>200</td>
<td>250</td>
</tr>
<tr>
<td style="width: 200px;">Стоимость ₽/шт.</td>
<td>219</td>
<td>159</td>
<td>135</td>
<td>126</td>
<td>122</td>
<td>95</td>
</tr>
</tbody>
</table>
</div></text>
<image_large></image_large>
<image_small>small_item_348.jpg</image_small>
<image_large_width></image_large_width>
<image_large_height></image_large_height>
<image_small_width>150</image_small_width>
<image_small_height>97</image_small_height>
<sorting>0</sorting>
<ip>31.132.137.253</ip>
<path>348</path>
<indexing>1</indexing>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<siteuser_group_id>-1</siteuser_group_id>
<showed>58</showed>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<guid>786D2175-B72A-C29C-9F7E-E87D4777DD33</guid>
<deleted>0</deleted>
<url>/produkciya/calendars/348/</url>
<date>05.10.2018</date>
<datetime>05.10.2018 15:56:48</datetime>
<start_datetime>0000-00-00 00:00:00</start_datetime>
<end_datetime>0000-00-00 00:00:00</end_datetime>
<dir>/upload/information_system_22/3/4/8/item_348/</dir>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
<property_value id="228">
<property_id>85</property_id>
<entity_id>348</entity_id>
<value></value>
<property_dir_id>0</property_dir_id>
<tag_name>h1</tag_name>
</property_value>
<property_value id="229">
<property_id>89</property_id>
<entity_id>348</entity_id>
<value>Формат основы: Д160хВ140хШ100 мм</value>
<property_dir_id>0</property_dir_id>
<tag_name>option_1</tag_name>
</property_value>
<property_value id="230">
<property_id>90</property_id>
<entity_id>348</entity_id>
<value></value>
<property_dir_id>0</property_dir_id>
<tag_name>option_2</tag_name>
</property_value>
<property_value id="235">
<property_id>88</property_id>
<entity_id>348</entity_id>
<value>95</value>
<property_dir_id>0</property_dir_id>
<tag_name>item_price</tag_name>
</property_value>
</informationsystem_item>
</informationsystem>
<informationsystem_dir_id>0</informationsystem_dir_id>
<structure_id>159</structure_id>
<site_id>2</site_id>
<name>Продукция</name>
<description></description>
<items_sorting_direction>0</items_sorting_direction>
<items_sorting_field>2</items_sorting_field>
<groups_sorting_direction>0</groups_sorting_direction>
<groups_sorting_field>1</groups_sorting_field>
<image_large_max_width>500</image_large_max_width>
<image_large_max_height>500</image_large_max_height>
<image_small_max_width>150</image_small_max_width>
<image_small_max_height>150</image_small_max_height>
<siteuser_group_id>0</siteuser_group_id>
<use_captcha>1</use_captcha>
<watermark_file></watermark_file>
<watermark_default_use_large_image>0</watermark_default_use_large_image>
<watermark_default_use_small_image>0</watermark_default_use_small_image>
<watermark_default_position_x>50%</watermark_default_position_x>
<watermark_default_position_y>100%</watermark_default_position_y>
<user_id>19</user_id>
<items_on_page>99</items_on_page>
<format_date>%d.%m.%Y</format_date>
<format_datetime>%d.%m.%Y %H:%M:%S</format_datetime>
<url_type>0</url_type>
<typograph_default_items>0</typograph_default_items>
<typograph_default_groups>0</typograph_default_groups>
<apply_tags_automatically>0</apply_tags_automatically>
<change_filename>1</change_filename>
<apply_keywords_automatically>0</apply_keywords_automatically>
<group_image_large_max_width>500</group_image_large_max_width>
<group_image_large_max_height>500</group_image_large_max_height>
<group_image_small_max_width>150</group_image_small_max_width>
<group_image_small_max_height>150</group_image_small_max_height>
<preserve_aspect_ratio>1</preserve_aspect_ratio>
<preserve_aspect_ratio_small>1</preserve_aspect_ratio_small>
<preserve_aspect_ratio_group>1</preserve_aspect_ratio_group>
<preserve_aspect_ratio_group_small>1</preserve_aspect_ratio_group_small>
<seo_group_title_template></seo_group_title_template>
<seo_group_keywords_template></seo_group_keywords_template>
<seo_group_description_template></seo_group_description_template>
<seo_item_title_template></seo_item_title_template>
<seo_item_keywords_template></seo_item_keywords_template>
<seo_item_description_template></seo_item_description_template>
<http>//www.artoprint.ru</http>
<url>/produkciya/</url>
<captcha_id>69930</captcha_id>
<siteuser_id>0</siteuser_id>
<ОтображатьСсылкуНаАрхив>0</ОтображатьСсылкуНаАрхив>
<ОтображатьСсылкиНаСледующиеСтраницы>1</ОтображатьСсылкиНаСледующиеСтраницы>
<ТекущаяГруппа>55</ТекущаяГруппа>
<show_comments>0</show_comments>
<show_add_comments>0</show_add_comments>
<group>55</group>
<page>0</page>
<part>0</part>
<limit>99</limit>
<informationsystem_group id="55">
<informationsystem_id>22</informationsystem_id>
<siteuser_id>0</siteuser_id>
<parent_id>0</parent_id>
<name>Календари</name>
<description></description>
<sorting>70</sorting>
<path>calendars</path>
<image_large></image_large>
<image_small>small_group_55.png</image_small>
<indexing>1</indexing>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<items_count>3</items_count>
<items_total_count>3</items_total_count>
<seo_title>Календари | Изготовление товаров из раздела: Календари в Москве</seo_title>
<seo_description>Предлагаем вам ознакомиться с продукцией, представленной в каталоге Календари.</seo_description>
<seo_keywords></seo_keywords>
<seo_group_title_template></seo_group_title_template>
<seo_group_keywords_template></seo_group_keywords_template>
<seo_group_description_template></seo_group_description_template>
<seo_item_title_template></seo_item_title_template>
<seo_item_keywords_template></seo_item_keywords_template>
<seo_item_description_template></seo_item_description_template>
<siteuser_group_id>-1</siteuser_group_id>
<active>1</active>
<user_id>19</user_id>
<guid>D357021E-5A5C-4078-C6C2-861AFABF1C14</guid>
<sns_type_id>0</sns_type_id>
<url>/produkciya/calendars/</url>
<dir>/upload/information_system_22/0/5/5/group_55/</dir>
</informationsystem_group>
<informationsystem_item_properties>
<property id="85">
<property_dir_id>0</property_dir_id>
<list_id>0</list_id>
<informationsystem_id>0</informationsystem_id>
<shop_id>0</shop_id>
<name>h1</name>
<description></description>
<type>1</type>
<default_value></default_value>
<tag_name>h1</tag_name>
<sorting>0</sorting>
<guid>9339A6FA-0BAF-8F69-23F0-0248E2FEF641</guid>
<multiple>0</multiple>
<user_id>19</user_id>
</property>
<property id="88">
<property_dir_id>0</property_dir_id>
<list_id>0</list_id>
<informationsystem_id>0</informationsystem_id>
<shop_id>0</shop_id>
<name>Цена</name>
<description></description>
<type>1</type>
<default_value></default_value>
<tag_name>item_price</tag_name>
<sorting>0</sorting>
<guid>FFBD6F4A-89F1-9741-5A2E-30DF7A64033C</guid>
<multiple>1</multiple>
<user_id>19</user_id>
</property>
<property id="89">
<property_dir_id>0</property_dir_id>
<list_id>0</list_id>
<informationsystem_id>0</informationsystem_id>
<shop_id>0</shop_id>
<name>Характеристика 1</name>
<description></description>
<type>1</type>
<default_value></default_value>
<tag_name>option_1</tag_name>
<sorting>0</sorting>
<guid>2A3E505D-A0F3-1ED9-A551-C6A761B51144</guid>
<multiple>1</multiple>
<user_id>19</user_id>
</property>
<property id="90">
<property_dir_id>0</property_dir_id>
<list_id>0</list_id>
<informationsystem_id>0</informationsystem_id>
<shop_id>0</shop_id>
<name>Характеристика 2</name>
<description></description>
<type>1</type>
<default_value></default_value>
<tag_name>option_2</tag_name>
<sorting>0</sorting>
<guid>4F8FFEE2-96A0-1F91-A0B7-55FE3358D205</guid>
<multiple>1</multiple>
<user_id>19</user_id>
</property>
</informationsystem_item_properties>
<informationsystem_item id="348">
<informationsystem_id>22</informationsystem_id>
<informationsystem_group_id>55</informationsystem_group_id>
<shortcut_id>0</shortcut_id>
<name>Календарь "домик" 160х140х100</name>
<description></description>
<active>1</active>
<text><div>
<table border="1" cellpadding="5" cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td>Формат основы:</td>
<td>Д160хВ140хШ100 мм</td>
</tr>
<tr>
<td>Формат листов блока:</td>
<td>160х140 мм</td>
</tr>
<tr>
<td>Количество перекидных листов:</td>
<td>13 листов</td>
</tr>
<tr>
<td>Бумага на ножку:</td>
<td>325 гр односторонний картон</td>
</tr>
<tr>
<td>Бумага на перекидные листы:</td>
<td>250 гр мелованная матовая</td>
</tr>
<tr>
<td>Цветность ножки:</td>
<td>0+0 (без печати)</td>
</tr>
<tr>
<td>Цветность перекидных листов:</td>
<td>4+4 (cmyk)</td>
</tr>
<tr>
<td>Послепечатные работы:</td>
<td>гл. ламинация ноги, 3 бига ножки, навивка белой пружиной по стороне 160 мм, упаковка в термоусадочную плёнку прозрачного цвета</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="5" cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td style="width: 200px;">Нога</td>
<td>380</td>
<td>380*160</td>
</tr>
</tbody>
</table>
<br />
<table border="1" cellpadding="5" cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td style="width: 200px;">Тираж</td>
<td>25</td>
<td>50</td>
<td>100</td>
<td>150</td>
<td>200</td>
<td>250</td>
</tr>
<tr>
<td style="width: 200px;">Стоимость ₽/шт.</td>
<td>219</td>
<td>159</td>
<td>135</td>
<td>126</td>
<td>122</td>
<td>95</td>
</tr>
</tbody>
</table>
</div></text>
<image_large></image_large>
<image_small>small_item_348.jpg</image_small>
<image_large_width></image_large_width>
<image_large_height></image_large_height>
<image_small_width>150</image_small_width>
<image_small_height>97</image_small_height>
<sorting>0</sorting>
<ip>31.132.137.253</ip>
<path>348</path>
<indexing>1</indexing>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<siteuser_group_id>-1</siteuser_group_id>
<showed>58</showed>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<guid>786D2175-B72A-C29C-9F7E-E87D4777DD33</guid>
<deleted>0</deleted>
<url>/produkciya/calendars/348/</url>
<date>05.10.2018</date>
<datetime>05.10.2018 15:56:48</datetime>
<start_datetime>0000-00-00 00:00:00</start_datetime>
<end_datetime>0000-00-00 00:00:00</end_datetime>
<dir>/upload/information_system_22/3/4/8/item_348/</dir>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
<property_value id="228">
<property_id>85</property_id>
<entity_id>348</entity_id>
<value></value>
<property_dir_id>0</property_dir_id>
<tag_name>h1</tag_name>
</property_value>
<property_value id="229">
<property_id>89</property_id>
<entity_id>348</entity_id>
<value>Формат основы: Д160хВ140хШ100 мм</value>
<property_dir_id>0</property_dir_id>
<tag_name>option_1</tag_name>
</property_value>
<property_value id="230">
<property_id>90</property_id>
<entity_id>348</entity_id>
<value></value>
<property_dir_id>0</property_dir_id>
<tag_name>option_2</tag_name>
</property_value>
<property_value id="235">
<property_id>88</property_id>
<entity_id>348</entity_id>
<value>95</value>
<property_dir_id>0</property_dir_id>
<tag_name>item_price</tag_name>
</property_value>
</informationsystem_item>
</informationsystem>
в 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="/">
<xsl:apply-templates select="/informationsystem/informationsystem_item"/>
</xsl:template>
<xsl:template match="/informationsystem/informationsystem_item">
<!-- Получаем ID родительской группы и записываем в переменную $group -->
<!-- <xsl:variable name="group" select="informationsystem_group_id"/> -->
<?php
// Вывод строки навигации
$Structure_Controller_Breadcrumbs = new Structure_Controller_Breadcrumbs(
Core_Entity::factory('Site', CURRENT_SITE)
);
$Structure_Controller_Breadcrumbs
->xsl(
Core_Entity::factory('Xsl')->getByName('ХлебныеКрошки')
)
->show();
?>
<xsl:choose>
<!--Если заполнено дополнительный заголвок-->
<xsl:when test="property_value[tag_name='h1']/value != ''">
<h1 hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item"><xsl:value-of select="property_value[tag_name='h1']/value"/></h1>
</xsl:when>
<!--Если не заполнено дополнительный заголвок выводим просто название элемента-->
<xsl:otherwise>
<h1 hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item"><xsl:value-of select="name"/></h1>
</xsl:otherwise>
</xsl:choose>
<!-- Путь к группе -->
<!-- <xsl:apply-templates select="//informationsystem_group[@id=$group]" mode="breadCrumbs"/> -->
<!-- Выводим сообщение -->
<xsl:if test="/informationsystem/message/node()">
<xsl:value-of disable-output-escaping="yes" select="/informationsystem/message"/>
</xsl:if>
<div class="item_block">
<!-- Фотогафия к информационному элементу -->
<div class="item_img">
<xsl:if test="image_small!=''">
<!-- Проверяем задан ли путь к файлу большого изображения -->
<xsl:choose>
<xsl:when test="image_large!=''">
<div id="gallery">
<a href="{dir}{image_large}" target="_blank">
<img src="{dir}{image_small}" class="news_img"/>
</a>
</div>
</xsl:when>
<xsl:otherwise>
<img src="{dir}{image_small}" class="news_img"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</div>
<div class="item_options">
<p class="bold">Характеристики</p>
<xsl:variable name="parent_name" select="parent_id"/>
<xsl:choose>
<!--Если заполнено доп-->
<xsl:when test="property_value[tag_name='option_1']/value != ''">
<p hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item"><xsl:value-of select="property_value[tag_name='option_1']/value"/></p>
</xsl:when>
</xsl:choose>
<xsl:choose>
<!--Если заполнено доп-->
<xsl:when test="property_value[tag_name='option_2']/value != ''">
<p hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item"><xsl:value-of select="property_value[tag_name='option_2']/value"/></p>
</xsl:when>
</xsl:choose>
<xsl:choose>
<!--Если заполнено доп-->
<xsl:when test="property_value[tag_name='item_price']/value != '0'">
<p hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item" class="price-p">Цена от: <span class="price-v"><xsl:value-of select="property_value[tag_name='item_price']/value"/></span> руб.</p>
</xsl:when>
<!--Если не заполнено доп-->
<xsl:otherwise>
<p hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item"><a href="#order" class="btn get_price_btn">Узнать цену</a></p>
</xsl:otherwise>
</xsl:choose>
</div>
<div class="ext_photo"></div>
<div class="item_order">
<a href="#order" class="btn order">Оставить заявку</a>
</div>
<!-- Текст информационного элемента -->
<xsl:choose>
<xsl:when test="parts_count > 1">
<xsl:value-of disable-output-escaping="yes" select="text"/>
</xsl:when>
<xsl:otherwise>
<div hostcms:id="{@id}" hostcms:field="text" hostcms:entity="informationsystem_item" hostcms:type="wysiwyg" class="item_description">
<xsl:value-of disable-output-escaping="yes" select="text"/>
</div>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="prorerty_value[tag_name = 'date']/value"/>
</div>
<!-- Ссылка 1-2-3 на части документа -->
<xsl:if test="parts_count > 1">
<div class="read_more">Читать дальше:</div>
<xsl:call-template name="for">
<xsl:with-param name="limit">1</xsl:with-param>
<xsl:with-param name="page" select="/informationsystem/part"/>
<xsl:with-param name="link" select="/informationsystem/informationsystem_item/url"/>
<xsl:with-param name="items_count" select="parts_count"/>
<xsl:with-param name="visible_pages">6</xsl:with-param>
<xsl:with-param name="prefix">part</xsl:with-param>
</xsl:call-template>
<div style="clear: both"></div>
</xsl:if>
<!--<xsl:if test="count(property_value[value != '' or file != '' or shop_item/node() or informationsystem_item/node()])">
<p class="h2">Атрибуты</p>
<table border="0" class="news_properties">
<xsl:apply-templates select="property_value[value != '' or file != '' or shop_item/node() or informationsystem_item/node()]"/>
</table>
</xsl:if>-->
<!-- Если указано отображать комментарии -->
<xsl:if test="/informationsystem/show_comments/node() and /informationsystem/show_comments = 1">
<!-- Отображение комментариев -->
<xsl:if test="count(comment) > 0">
<p class="h1"><a name="comments"></a>Комментарии</p>
<xsl:apply-templates select="comment"/>
</xsl:if>
</xsl:if>
<!-- Если разрешено отображать формы добавления комментария
1 - Только авторизированным
2 - Всем
-->
<xsl:if test="/informationsystem/show_add_comments/node() and ((/informationsystem/show_add_comments = 1 and /informationsystem/siteuser_id > 0) or /informationsystem/show_add_comments = 2)">
<p class="button" onclick="$('.comment_reply').hide('slow');$('#AddComment').toggle('slow')">
Добавить комментарий
</p>
<div id="AddComment" class="comment_reply">
<xsl:call-template name="AddCommentForm"></xsl:call-template>
</div>
</xsl:if>
</xsl:template>
<!-- Метки -->
<xsl:template match="tag">
<a href="{/informationsystem/url}tag/{urlencode}/" class="tag">
<xsl:value-of select="name"/>
</a>
<xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
</xsl:template>
<!-- Шаблон выводит рекурсивно ссылки на группы инф. элемента -->
<xsl:template match="informationsystem_group" mode="breadCrumbs">
<xsl:variable name="parent_id" select="parent_id"/>
<!-- Выбираем рекурсивно вышестоящую группу -->
<xsl:apply-templates select="//informationsystem_group[@id=$parent_id]" mode="breadCrumbs"/>
<xsl:if test="parent_id=0">
<a href="{/informationsystem/url}">
<xsl:value-of select="/informationsystem/name"/>
</a>
</xsl:if>
<span><xsl:text> → </xsl:text></span>
<a href="{url}">
<xsl:value-of select="name"/>
</a>
</xsl:template>
<!-- Вывод строки со значением свойства -->
<xsl:template match="property_value">
<xsl:variable name="property_id" select="property_id" />
<xsl:variable name="property" select="/informationsystem/informationsystem_item_properties/property[@id=$property_id]" />
<tr>
<th>
<xsl:value-of select="$property/name"/>
</th>
<td>
<xsl:choose>
<xsl:when test="$property/type = 2">
<a href="{/informationsystem/informationsystem_item/dir}{file}">Скачать файл</a>
</xsl:when>
<xsl:when test="$property/type = 5">
<a href="{informationsystem_item/url}"><xsl:value-of select="informationsystem_item/name"/></a>
</xsl:when>
<xsl:when test="$property/type = 7">
<input type="checkbox" disabled="disabled">
<xsl:if test="value = 1">
<xsl:attribute name="checked">checked</xsl:attribute>
</xsl:if>
</input>
</xsl:when>
<xsl:when test="$property/type = 12">
<a href="{shop_item/url}"><xsl:value-of select="shop_item/name"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="value"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:template>
<!-- Цикл для вывода строк ссылок -->
<xsl:template name="for">
<xsl:param name="i" select="0"/>
<xsl:param name="prefix">page</xsl:param>
<xsl:param name="link"/>
<xsl:param name="limit"/>
<xsl:param name="page"/>
<xsl:param name="items_count"/>
<xsl:param name="visible_pages"/>
<xsl:variable name="n" select="$items_count div $limit"/>
<!-- Заносим в переменную $group идентификатор текущей группы -->
<xsl:variable name="group" select="/informationsystem/group"/>
<!-- Считаем количество выводимых ссылок перед текущим элементом -->
<xsl:variable name="pre_count_page">
<xsl:choose>
<xsl:when test="$page > ($n - (round($visible_pages div 2) - 1))">
<xsl:value-of select="$visible_pages - ($n - $page)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="round($visible_pages div 2) - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Считаем количество выводимых ссылок после текущего элемента -->
<xsl:variable name="post_count_page">
<xsl:choose>
<xsl:when test="0 > $page - (round($visible_pages div 2) - 1)">
<xsl:value-of select="$visible_pages - $page"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="round($visible_pages div 2) = ($visible_pages div 2)">
<xsl:value-of select="$visible_pages div 2"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="round($visible_pages div 2) - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="$items_count > $limit and $n > $i">
<!-- Ставим ссылку на страницу-->
<xsl:if test="$i != $page">
<!-- Определяем адрес тэга -->
<xsl:variable name="tag_link">
<xsl:choose>
<!-- Если не нулевой уровень -->
<xsl:when test="count(/informationsystem/tag) != 0">tag/<xsl:value-of select="/informationsystem/tag/urlencode"/>/</xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Определяем адрес ссылки -->
<xsl:variable name="number_link">
<xsl:choose>
<!-- Если не нулевой уровень -->
<xsl:when test="$i != 0">
<xsl:value-of select="$prefix"/>-<xsl:value-of select="$i + 1"/>/</xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Выводим ссылку на первую страницу -->
<xsl:if test="$page - $pre_count_page > 0 and $i = 0">
<a href="{$link}" class="page_link" style="text-decoration: none;">←</a>
</xsl:if>
<xsl:choose>
<xsl:when test="$i >= ($page - $pre_count_page) and ($page + $post_count_page) >= $i">
<!-- Выводим ссылки на видимые страницы -->
<a href="{$link}{$tag_link}{$number_link}" class="page_link">
<xsl:value-of select="$i + 1"/>
</a>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
<!-- Выводим ссылку на последнюю страницу -->
<xsl:if test="$i+1 >= $n and $n > ($page + 1 + $post_count_page)">
<xsl:choose>
<xsl:when test="$n > round($n)">
<!-- Выводим ссылку на последнюю страницу -->
<a href="{$link}{$prefix}-{round($n+1)}/" class="page_link" style="text-decoration: none;">→</a>
</xsl:when>
<xsl:otherwise>
<a href="{$link}{$prefix}-{round($n)}/" class="page_link" style="text-decoration: none;">→</a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:if>
<!-- Не ставим ссылку на страницу-->
<xsl:if test="$i = $page">
<span class="current">
<xsl:value-of select="$i+1"/>
</span>
</xsl:if>
<!-- Рекурсивный вызов шаблона. НЕОБХОДИМО ПЕРЕДАВАТЬ ВСЕ НЕОБХОДИМЫЕ ПАРАМЕТРЫ! -->
<xsl:call-template name="for">
<xsl:with-param name="i" select="$i + 1"/>
<xsl:with-param name="prefix" select="$prefix"/>
<xsl:with-param name="link" select="$link"/>
<xsl:with-param name="limit" select="$limit"/>
<xsl:with-param name="page" select="$page"/>
<xsl:with-param name="items_count" select="$items_count"/>
<xsl:with-param name="visible_pages" select="$visible_pages"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
<!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="/">
<xsl:apply-templates select="/informationsystem/informationsystem_item"/>
</xsl:template>
<xsl:template match="/informationsystem/informationsystem_item">
<!-- Получаем ID родительской группы и записываем в переменную $group -->
<!-- <xsl:variable name="group" select="informationsystem_group_id"/> -->
<?php
// Вывод строки навигации
$Structure_Controller_Breadcrumbs = new Structure_Controller_Breadcrumbs(
Core_Entity::factory('Site', CURRENT_SITE)
);
$Structure_Controller_Breadcrumbs
->xsl(
Core_Entity::factory('Xsl')->getByName('ХлебныеКрошки')
)
->show();
?>
<xsl:choose>
<!--Если заполнено дополнительный заголвок-->
<xsl:when test="property_value[tag_name='h1']/value != ''">
<h1 hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item"><xsl:value-of select="property_value[tag_name='h1']/value"/></h1>
</xsl:when>
<!--Если не заполнено дополнительный заголвок выводим просто название элемента-->
<xsl:otherwise>
<h1 hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item"><xsl:value-of select="name"/></h1>
</xsl:otherwise>
</xsl:choose>
<!-- Путь к группе -->
<!-- <xsl:apply-templates select="//informationsystem_group[@id=$group]" mode="breadCrumbs"/> -->
<!-- Выводим сообщение -->
<xsl:if test="/informationsystem/message/node()">
<xsl:value-of disable-output-escaping="yes" select="/informationsystem/message"/>
</xsl:if>
<div class="item_block">
<!-- Фотогафия к информационному элементу -->
<div class="item_img">
<xsl:if test="image_small!=''">
<!-- Проверяем задан ли путь к файлу большого изображения -->
<xsl:choose>
<xsl:when test="image_large!=''">
<div id="gallery">
<a href="{dir}{image_large}" target="_blank">
<img src="{dir}{image_small}" class="news_img"/>
</a>
</div>
</xsl:when>
<xsl:otherwise>
<img src="{dir}{image_small}" class="news_img"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</div>
<div class="item_options">
<p class="bold">Характеристики</p>
<xsl:variable name="parent_name" select="parent_id"/>
<xsl:choose>
<!--Если заполнено доп-->
<xsl:when test="property_value[tag_name='option_1']/value != ''">
<p hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item"><xsl:value-of select="property_value[tag_name='option_1']/value"/></p>
</xsl:when>
</xsl:choose>
<xsl:choose>
<!--Если заполнено доп-->
<xsl:when test="property_value[tag_name='option_2']/value != ''">
<p hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item"><xsl:value-of select="property_value[tag_name='option_2']/value"/></p>
</xsl:when>
</xsl:choose>
<xsl:choose>
<!--Если заполнено доп-->
<xsl:when test="property_value[tag_name='item_price']/value != '0'">
<p hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item" class="price-p">Цена от: <span class="price-v"><xsl:value-of select="property_value[tag_name='item_price']/value"/></span> руб.</p>
</xsl:when>
<!--Если не заполнено доп-->
<xsl:otherwise>
<p hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_item"><a href="#order" class="btn get_price_btn">Узнать цену</a></p>
</xsl:otherwise>
</xsl:choose>
</div>
<div class="ext_photo"></div>
<div class="item_order">
<a href="#order" class="btn order">Оставить заявку</a>
</div>
<!-- Текст информационного элемента -->
<xsl:choose>
<xsl:when test="parts_count > 1">
<xsl:value-of disable-output-escaping="yes" select="text"/>
</xsl:when>
<xsl:otherwise>
<div hostcms:id="{@id}" hostcms:field="text" hostcms:entity="informationsystem_item" hostcms:type="wysiwyg" class="item_description">
<xsl:value-of disable-output-escaping="yes" select="text"/>
</div>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="prorerty_value[tag_name = 'date']/value"/>
</div>
<!-- Ссылка 1-2-3 на части документа -->
<xsl:if test="parts_count > 1">
<div class="read_more">Читать дальше:</div>
<xsl:call-template name="for">
<xsl:with-param name="limit">1</xsl:with-param>
<xsl:with-param name="page" select="/informationsystem/part"/>
<xsl:with-param name="link" select="/informationsystem/informationsystem_item/url"/>
<xsl:with-param name="items_count" select="parts_count"/>
<xsl:with-param name="visible_pages">6</xsl:with-param>
<xsl:with-param name="prefix">part</xsl:with-param>
</xsl:call-template>
<div style="clear: both"></div>
</xsl:if>
<!--<xsl:if test="count(property_value[value != '' or file != '' or shop_item/node() or informationsystem_item/node()])">
<p class="h2">Атрибуты</p>
<table border="0" class="news_properties">
<xsl:apply-templates select="property_value[value != '' or file != '' or shop_item/node() or informationsystem_item/node()]"/>
</table>
</xsl:if>-->
<!-- Если указано отображать комментарии -->
<xsl:if test="/informationsystem/show_comments/node() and /informationsystem/show_comments = 1">
<!-- Отображение комментариев -->
<xsl:if test="count(comment) > 0">
<p class="h1"><a name="comments"></a>Комментарии</p>
<xsl:apply-templates select="comment"/>
</xsl:if>
</xsl:if>
<!-- Если разрешено отображать формы добавления комментария
1 - Только авторизированным
2 - Всем
-->
<xsl:if test="/informationsystem/show_add_comments/node() and ((/informationsystem/show_add_comments = 1 and /informationsystem/siteuser_id > 0) or /informationsystem/show_add_comments = 2)">
<p class="button" onclick="$('.comment_reply').hide('slow');$('#AddComment').toggle('slow')">
Добавить комментарий
</p>
<div id="AddComment" class="comment_reply">
<xsl:call-template name="AddCommentForm"></xsl:call-template>
</div>
</xsl:if>
</xsl:template>
<!-- Метки -->
<xsl:template match="tag">
<a href="{/informationsystem/url}tag/{urlencode}/" class="tag">
<xsl:value-of select="name"/>
</a>
<xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
</xsl:template>
<!-- Шаблон выводит рекурсивно ссылки на группы инф. элемента -->
<xsl:template match="informationsystem_group" mode="breadCrumbs">
<xsl:variable name="parent_id" select="parent_id"/>
<!-- Выбираем рекурсивно вышестоящую группу -->
<xsl:apply-templates select="//informationsystem_group[@id=$parent_id]" mode="breadCrumbs"/>
<xsl:if test="parent_id=0">
<a href="{/informationsystem/url}">
<xsl:value-of select="/informationsystem/name"/>
</a>
</xsl:if>
<span><xsl:text> → </xsl:text></span>
<a href="{url}">
<xsl:value-of select="name"/>
</a>
</xsl:template>
<!-- Вывод строки со значением свойства -->
<xsl:template match="property_value">
<xsl:variable name="property_id" select="property_id" />
<xsl:variable name="property" select="/informationsystem/informationsystem_item_properties/property[@id=$property_id]" />
<tr>
<th>
<xsl:value-of select="$property/name"/>
</th>
<td>
<xsl:choose>
<xsl:when test="$property/type = 2">
<a href="{/informationsystem/informationsystem_item/dir}{file}">Скачать файл</a>
</xsl:when>
<xsl:when test="$property/type = 5">
<a href="{informationsystem_item/url}"><xsl:value-of select="informationsystem_item/name"/></a>
</xsl:when>
<xsl:when test="$property/type = 7">
<input type="checkbox" disabled="disabled">
<xsl:if test="value = 1">
<xsl:attribute name="checked">checked</xsl:attribute>
</xsl:if>
</input>
</xsl:when>
<xsl:when test="$property/type = 12">
<a href="{shop_item/url}"><xsl:value-of select="shop_item/name"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="value"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:template>
<!-- Цикл для вывода строк ссылок -->
<xsl:template name="for">
<xsl:param name="i" select="0"/>
<xsl:param name="prefix">page</xsl:param>
<xsl:param name="link"/>
<xsl:param name="limit"/>
<xsl:param name="page"/>
<xsl:param name="items_count"/>
<xsl:param name="visible_pages"/>
<xsl:variable name="n" select="$items_count div $limit"/>
<!-- Заносим в переменную $group идентификатор текущей группы -->
<xsl:variable name="group" select="/informationsystem/group"/>
<!-- Считаем количество выводимых ссылок перед текущим элементом -->
<xsl:variable name="pre_count_page">
<xsl:choose>
<xsl:when test="$page > ($n - (round($visible_pages div 2) - 1))">
<xsl:value-of select="$visible_pages - ($n - $page)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="round($visible_pages div 2) - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Считаем количество выводимых ссылок после текущего элемента -->
<xsl:variable name="post_count_page">
<xsl:choose>
<xsl:when test="0 > $page - (round($visible_pages div 2) - 1)">
<xsl:value-of select="$visible_pages - $page"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="round($visible_pages div 2) = ($visible_pages div 2)">
<xsl:value-of select="$visible_pages div 2"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="round($visible_pages div 2) - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="$items_count > $limit and $n > $i">
<!-- Ставим ссылку на страницу-->
<xsl:if test="$i != $page">
<!-- Определяем адрес тэга -->
<xsl:variable name="tag_link">
<xsl:choose>
<!-- Если не нулевой уровень -->
<xsl:when test="count(/informationsystem/tag) != 0">tag/<xsl:value-of select="/informationsystem/tag/urlencode"/>/</xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Определяем адрес ссылки -->
<xsl:variable name="number_link">
<xsl:choose>
<!-- Если не нулевой уровень -->
<xsl:when test="$i != 0">
<xsl:value-of select="$prefix"/>-<xsl:value-of select="$i + 1"/>/</xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Выводим ссылку на первую страницу -->
<xsl:if test="$page - $pre_count_page > 0 and $i = 0">
<a href="{$link}" class="page_link" style="text-decoration: none;">←</a>
</xsl:if>
<xsl:choose>
<xsl:when test="$i >= ($page - $pre_count_page) and ($page + $post_count_page) >= $i">
<!-- Выводим ссылки на видимые страницы -->
<a href="{$link}{$tag_link}{$number_link}" class="page_link">
<xsl:value-of select="$i + 1"/>
</a>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
<!-- Выводим ссылку на последнюю страницу -->
<xsl:if test="$i+1 >= $n and $n > ($page + 1 + $post_count_page)">
<xsl:choose>
<xsl:when test="$n > round($n)">
<!-- Выводим ссылку на последнюю страницу -->
<a href="{$link}{$prefix}-{round($n+1)}/" class="page_link" style="text-decoration: none;">→</a>
</xsl:when>
<xsl:otherwise>
<a href="{$link}{$prefix}-{round($n)}/" class="page_link" style="text-decoration: none;">→</a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:if>
<!-- Не ставим ссылку на страницу-->
<xsl:if test="$i = $page">
<span class="current">
<xsl:value-of select="$i+1"/>
</span>
</xsl:if>
<!-- Рекурсивный вызов шаблона. НЕОБХОДИМО ПЕРЕДАВАТЬ ВСЕ НЕОБХОДИМЫЕ ПАРАМЕТРЫ! -->
<xsl:call-template name="for">
<xsl:with-param name="i" select="$i + 1"/>
<xsl:with-param name="prefix" select="$prefix"/>
<xsl:with-param name="link" select="$link"/>
<xsl:with-param name="limit" select="$limit"/>
<xsl:with-param name="page" select="$page"/>
<xsl:with-param name="items_count" select="$items_count"/>
<xsl:with-param name="visible_pages" select="$visible_pages"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
как вы вести эти хлебные крошки в чем тут ошибка?
Господи, что это за жесть то в XSL-шаблоне?
Где такое сказано, что в XSL можно писать PHP и ожидать что он заработает. Лучше раскомментируйте строки:
Цитата:
и
<!-- <xsl:apply-templates select="//informationsystem_group[@id=$group]" mode="breadCrumbs"/> -->
Это и есть хлебные крошки.
<?php
// Вывод строки навигации
$Structure_Controller_Breadcrumbs = new Structure_Controller_Breadcrumbs(
Core_Entity::factory('Site', CURRENT_SITE)
);
$Structure_Controller_Breadcrumbs
->xsl(
Core_Entity::factory('Xsl')->getByName('ХлебныеКрошки')
)
->show();
?>
// Вывод строки навигации
$Structure_Controller_Breadcrumbs = new Structure_Controller_Breadcrumbs(
Core_Entity::factory('Site', CURRENT_SITE)
);
$Structure_Controller_Breadcrumbs
->xsl(
Core_Entity::factory('Xsl')->getByName('ХлебныеКрошки')
)
->show();
?>
Где такое сказано, что в XSL можно писать PHP и ожидать что он заработает. Лучше раскомментируйте строки:
Цитата:
<!-- <xsl:variable name="group" select="informationsystem_group_id"/> -->
и
<!-- <xsl:apply-templates select="//informationsystem_group[@id=$group]" mode="breadCrumbs"/> -->
Это и есть хлебные крошки.
Вы только что начали читать предложение, чтение которого вы уже заканчиваете.
Вот в том и дело что при раскомментированной строке выдает ошибку
line 46 element apply-templates, Line: 0 Libxml error 1: Variable 'group' has not been declared., Line: 0 Libxml error 1: xmlXPathCompiledEval: 2 objects left on the stack., Line: 0 Libxml error 1: runtime error: line 46 element apply-templates, Line: 0 Libxml error 1: Failed to evaluate the 'select' expression., Line: 0
line 46 element apply-templates, Line: 0 Libxml error 1: Variable 'group' has not been declared., Line: 0 Libxml error 1: xmlXPathCompiledEval: 2 objects left on the stack., Line: 0 Libxml error 1: runtime error: line 46 element apply-templates, Line: 0 Libxml error 1: Failed to evaluate the 'select' expression., Line: 0
Я же вам писал, что 2 строки нужно раскомментировать. Еще:
<xsl:variable name="group" select="informationsystem_group_id"/>
Вы только что начали читать предложение, чтение которого вы уже заканчиваете.
Авторизация