Доп свойство Файл

#
Доп свойство Файл
Здравствуйте. возникла проблема с выводом доп-свойств
/upload/information_system_16/2/0/8/item_2082/information_items_property_453.jpg
- по этому пути лежит большая картинка доп.свойства

<div>
         <div style="background-image:url({dir}{property_value[tag_name='afisha-head']/file});" class="slide-new">
         <a href="{url}" class="banner-ssyl" >
         
         </a>
         </div>
      </div>

Вывожу этим кодом и на выходе получаю
style="background-image:url(/upload/information_system_16/2/0/8/item_2085/);"

Почему то не хватает имени файла в конце.
#
Re: Доп свойство Файл
alexandrov писал(а):
<div style="background-image:url({dir}{property_value[tag_name='afisha-head']/file});" class="slide-new">

Не пробовали так?
<div style="background-image:url(<xsl:value-of select="dir"/><xsl:value-of select="property_value[tag_name='afisha-head']/file"/>);" class="slide-new">

Или так например:
<div>
<xsl:attribute name="style">background-image:url('<xsl:value-of select="dir"/><xsl:value-of select="property_value[tag_name='afisha-head']/file"/>')</xsl:attribute>
</div>
E-mail: info@syrbek.ru / телега: @syrbek /skype: activexm / syrbek.ru / Поддержка сайтов / г. Москва [HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, Git, SVN, Redmine]
Модератор
#
Re: Доп свойство Файл
Так а в XML у вас есть блок с afisha-head? Покажите фрагмент XML.
#
Re: Доп свойство Файл
<informationsystem id="16">
   <informationsystem_dir_id>0</informationsystem_dir_id>
   <structure_id>99</structure_id>
   <site_id>1</site_id>
   <name>Афиша</name>
   <description></description>
   <items_sorting_direction>1</items_sorting_direction>
   <items_sorting_field>0</items_sorting_field>
   <groups_sorting_direction>0</groups_sorting_direction>
   <groups_sorting_field>0</groups_sorting_field>
   <image_large_max_width>1000</image_large_max_width>
   <image_large_max_height>1000</image_large_max_height>
   <image_small_max_width>247</image_small_max_width>
   <image_small_max_height>354</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>1</watermark_default_use_large_image>
   <watermark_default_use_small_image>1</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>9</items_on_page>
   <format_date>%d.%m.%Y</format_date>
   <format_datetime>%d.%m.%Y </format_datetime>
   <url_type>0</url_type>
   <typograph_default_items>1</typograph_default_items>
   <typograph_default_groups>1</typograph_default_groups>
   <apply_tags_automatically>1</apply_tags_automatically>
   <change_filename>1</change_filename>
   <apply_keywords_automatically>0</apply_keywords_automatically>
   <group_image_large_max_width>1000</group_image_large_max_width>
   <group_image_large_max_height>1000</group_image_large_max_height>
   <group_image_small_max_width>247</group_image_small_max_width>
   <group_image_small_max_height>354</group_image_small_max_height>
   <preserve_aspect_ratio>1</preserve_aspect_ratio>
   <preserve_aspect_ratio_small>0</preserve_aspect_ratio_small>
   <preserve_aspect_ratio_group>1</preserve_aspect_ratio_group>
   <preserve_aspect_ratio_group_small>0</preserve_aspect_ratio_group_small>
   <http>//filarmonia32.ru</http>
   <url>/billboard/</url>
   <captcha_id>38143</captcha_id>
   <items_count>154</items_count>
   <items_total_count>154</items_total_count>
   <subgroups_count>0</subgroups_count>
   <subgroups_total_count>0</subgroups_total_count>
   <siteuser_id>0</siteuser_id>
   <group>0</group>
   <page>0</page>
   <part>0</part>
   <limit>6</limit>
   <total>2</total>
   <informationsystem_item id="2082">
      <informationsystem_id>16</informationsystem_id>
      <informationsystem_group_id>0</informationsystem_group_id>
      <shortcut_id>0</shortcut_id>
      <name>Юбилейный концерт группы ВИА «Стожары»</name>
      <description>&lt;p&gt;3 марта 2017 года в&amp;nbsp;19.00 на&amp;nbsp;сцене к/з&lt;span style=&quot;margin-right: 0.3em&quot;&gt; &lt;/span&gt; &lt;span style=&quot;margin-left: -0.3em&quot;&gt;&amp;laquo;Дружба&lt;/span&gt;&amp;raquo; Брянской областной филармонии состоится юбилейный концерт группы ВИА&lt;span style=&quot;margin-right: 0.3em&quot;&gt; &lt;/span&gt; &lt;span style=&quot;margin-left: -0.3em&quot;&gt;&amp;laquo;Стожары&lt;/span&gt;&amp;raquo;&lt;/p&gt;</description>
      <active>1</active>
      <image_large>information_items_2082.jpg</image_large>
      <image_small>small_information_items_2082.jpg</image_small>
      <image_large_width>707</image_large_width>
      <image_large_height>1000</image_large_height>
      <image_small_width>247</image_small_width>
      <image_small_height>354</image_small_height>
      <sorting>0</sorting>
      <ip>109.194.1.141</ip>
      <path>2082</path>
      <indexing>1</indexing>
      <seo_title></seo_title>
      <seo_description></seo_description>
      <seo_keywords></seo_keywords>
      <siteuser_group_id>-1</siteuser_group_id>
      <showed>65</showed>
      <user_id>19</user_id>
      <siteuser_id>0</siteuser_id>
      <deleted>0</deleted>
      <url>/billboard/2082/</url>
      <date>03.03.2017</date>
      <datetime>03.03.2017 </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_16/2/0/8/item_2082/</dir>
   </informationsystem_item>
   <informationsystem_item id="2085">
      <informationsystem_id>16</informationsystem_id>
      <informationsystem_group_id>0</informationsystem_group_id>
      <shortcut_id>0</shortcut_id>
      <name>Праздничный концерт ансамбля народной музыки «Ватага» </name>
      <description>&lt;p&gt;В День Защитника Отечества &lt;b&gt;23 февраля&lt;/b&gt; 2017 года в&amp;nbsp;&lt;b&gt;17.00&lt;/b&gt; на&amp;nbsp;сцене к/з&lt;span style=&quot;margin-right: 0.3em&quot;&gt; &lt;/span&gt; &lt;span style=&quot;margin-left: -0.3em&quot;&gt;&amp;laquo;Дружба&lt;/span&gt;&amp;raquo; Брянской областной филармонии состоится праздничный концерт ансамбля народной музыки&lt;span style=&quot;margin-right: 0.3em&quot;&gt; &lt;/span&gt; &lt;b&gt;&lt;span style=&quot;margin-left: -0.3em&quot;&gt;&amp;laquo;Ватага&lt;/span&gt;&amp;raquo;&lt;/b&gt; под&amp;nbsp;управлением художественного руководителя Александра Колесникова.&lt;/p&gt;</description>
      <active>1</active>
      <image_large>information_items_2085.jpg</image_large>
      <image_small>small_information_items_2085.jpg</image_small>
      <image_large_width>712</image_large_width>
      <image_large_height>1000</image_large_height>
      <image_small_width>247</image_small_width>
      <image_small_height>354</image_small_height>
      <sorting>0</sorting>
      <ip>109.194.1.141</ip>
      <path>2085</path>
      <indexing>1</indexing>
      <seo_title></seo_title>
      <seo_description></seo_description>
      <seo_keywords></seo_keywords>
      <siteuser_group_id>-1</siteuser_group_id>
      <showed>30</showed>
      <user_id>19</user_id>
      <siteuser_id>0</siteuser_id>
      <deleted>0</deleted>
      <url>/billboard/2085/</url>
      <date>23.02.2017</date>
      <datetime>23.02.2017 </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_16/2/0/8/item_2085/</dir>
   </informationsystem_item>
</informationsystem>
#
Re: Доп свойство Файл
Да свойства нет в XML, вот контроллер, вывод свойств включен вроде
<?php
                     // Новости
                     $Informationsystem_Controller_Show = new Informationsystem_Controller_Show(
                        Core_Entity::factory('Informationsystem', 16)
                     );
                     $Informationsystem_Controller_Show
                        ->xsl(
                              Core_Entity::factory('Xsl')->getByName('СписокАфишНаГлавнойВшапке')
                        )
                        ->groupsMode('none')
                        ->itemsProperties(TRUE)
                        ->itemsForbiddenTags(array('text'))
                        ->group(FALSE)
                        ->limit(6)
                        //->show()
                        ;

                     // Объединение с нужной таблицей свойств
                     $Informationsystem_Controller_Show
                        ->informationsystemItems()
                        ->queryBuilder()
                        ->leftJoin('informationsystem_item_properties', 'informationsystem_items.informationsystem_id', '=', 'informationsystem_item_properties.informationsystem_id')
                        ->leftJoin('property_value_ints', 'informationsystem_items.id', '=', 'property_value_ints.entity_id',
                              array(
                                 array('AND' => array('informationsystem_item_properties.property_id', '=', Core_QueryBuilder::expression('`property_value_ints`.`property_id`')))
                              )
                        )
                        // Идентификатор дополнительного свойства
                        ->where('informationsystem_item_properties.property_id', '=', 103)
                        // Значание дополнительного свойства
                        ->where('property_value_ints.value', '=', '1')
                        ->groupBy('informationsystem_items.id')
                        // Количество свойств
                        ->having(Core_Querybuilder::expression('COUNT(DISTINCT `informationsystem_item_properties`.`property_id`)'), '=', 1)
                        ;

                        $Informationsystem_Controller_Show->show();

                  ?>

#
Re: Доп свойство Файл
Хотя нет, все есть
#
Re: Доп свойство Файл
Все решил проблему, всем спасибо
Авторизация