Вывод объектов недвижимости на главной

#
Вывод объектов недвижимости на главной
Здравствуйте, я использую стандартный шаблон для агентства недвижимости, существует стандартный 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">
   <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:decimal-format name="my" decimal-separator="," grouping-separator=" "/>
   
   <xsl:template match="/">
      <xsl:apply-templates select="/shop"/>
   </xsl:template>
   
   <!-- Шаблон для магазина -->
   <xsl:template match="/shop">
      
      <SCRIPT>
         <xsl:comment>
            <xsl:text disable-output-escaping="yes">
               <![CDATA[
               function set_count_mod(input_id, step)
               {
               var oCountMod = document.getElementById(input_id);
               
               if (!(iCurrCount = parseInt(oCountMod.value))) {
               iCurrCount = 0;
               }
               
               if (!(iCurrCount <= 0 && step < 0)) {
                     oCountMod.value = iCurrCount + step;
                     }
                     }
                     ]]>
                  </xsl:text>
               </xsl:comment>
            </SCRIPT>
            
            <!-- Получаем ID родительской группы и записываем в переменную $parent_group_id -->
            <xsl:variable name="parent_group_id" select="@current_group_id"/>
            
            <!-- Если в находимся корне - выводим название информационной системы -->
            <xsl:if test="$parent_group_id = 0">
               <div class="title">
                  <xsl:value-of disable-output-escaping="yes" select="name"/>
               </div>
            </xsl:if>
            
            <!-- Если в находимся в группе - выводим название группы -->
            <xsl:if test="$parent_group_id != 0">
               <div class="title">
                  <xsl:value-of disable-output-escaping="yes" select=".//group[@id=$parent_group_id]/name"/>
               </div>
            </xsl:if>
            
            <!-- Обработка выбранных тэгов -->
            <xsl:if test="count(selected_tags/tag) = 1">
            <h2>Метка &#8212; <strong><xsl:value-of select="selected_tags/tag/tag_name"/></strong>.</h2>
            </xsl:if>
            
            <!-- Путь к группе -->
            <div class="path">
               <xsl:apply-templates select=".//group[@id=$parent_group_id]" mode="goup_path"/>
            </div>
            
            <xsl:variable name="count">1</xsl:variable>
            
            <!-- дополнение пути для action, если выбрана метка -->
         <xsl:variable name="form_tag_path"><xsl:if test="count(selected_tags/tag) = 1">tag/<xsl:value-of select="selected_tags/tag/tag_path_name"/>/</xsl:if></xsl:variable>
            
            <div class="wrapper">
               <xsl:apply-templates select="item" />
            </div>
         </xsl:template>
         
         <!-- Вывод раздела для свойств группы товаров -->
         <xsl:template match="properties_groups_dir">
            
         <p><b><xsl:value-of select="shop_properties_groups_dir_name"/></b></p>
            
            <xsl:variable name="dir_id" select="@id"/>
            
            <xsl:if test="count(/shop/group[@id = /shop/@current_group_id]/propertys/property)">
               <table border="0">
                  <xsl:apply-templates select="/shop/group[@id = /shop/@current_group_id]/propertys/property[@parent_id = $dir_id]"/>
               </table>
            </xsl:if>
            
            <xsl:if test="count(properties_groups_dir)">
               <blockquote>
                  <xsl:apply-templates select="properties_groups_dir"/>
               </blockquote>
            </xsl:if>
         </xsl:template>
         
         <!-- Вывод строки со значением свойства -->
         <xsl:template match="property">
            <tr>
               <td style="padding: 5px" bgcolor="#eeeeee">
                  <b><xsl:value-of select="name"/></b>
               </td>
               <td style="padding: 5px" bgcolor="#eeeeee">
                  <xsl:choose>
                     <xsl:when test="type = 1">
                        <a href="{file_path}">Скачать файл</a>
                     </xsl:when>
                     <xsl:when test="type = 7">
                        <xsl:choose>
                           <xsl:when test="value = 1">
                              <input type="checkbox" checked="" disabled="" />
                           </xsl:when>
                           <xsl:otherwise>
                              <input type="checkbox" disabled="" />
                           </xsl:otherwise>
                        </xsl:choose>
                     </xsl:when>
                     <xsl:otherwise>
                        <xsl:value-of disable-output-escaping="yes" select="value"/>
                     </xsl:otherwise>
                  </xsl:choose>
               </td>
            </tr>
         </xsl:template>
         
         
         <!-- Шаблон для товара -->
         <xsl:template match="item">
            
<xsl:variable name="col_class">col-<xsl:choose><xsl:when test="position() = 1 or position() > 3 and ((position()-1) mod 3 = 0)">1</xsl:when><xsl:when test="position()=2  or position() > 3 and ((position()-2) mod 3 = 0)">2</xsl:when><xsl:when test="position()=3 or position() > 3 and ((position()-3) mod 3 = 0)">3</xsl:when></xsl:choose></xsl:variable>
            
            <div class="{$col_class} maxheight">
               <div class="box maxheight">
                  <div class="border-top maxheight">
                     <div class="border-right maxheight">
                        <div class="border-bot maxheight">
                           <div class="border-left maxheight">
                              <div class="left-top-corner maxheight">
                                 <div class="right-top-corner maxheight">
                                    <div class="right-bot-corner maxheight">
                                       <div class="left-bot-corner maxheight">
                                          <div class="inner">
                                             <!-- Изображение для информационного элемента (если есть) -->
                                             <xsl:if test="small_image!=''">
                                                <div class="img-indent">
                                                   <a href="{/shop/path}{fullpath}{path}/"><img src="{small_image}" /></a>
                                                </div>
                                             </xsl:if>
                                             
                                          <h5><a href="{/shop/path}{fullpath}{path}/"><xsl:value-of disable-output-escaping="yes" select="name"/></a></h5>
                                             <p class="p0"><xsl:value-of disable-output-escaping="yes" select="description"/></p>
                                             
                                             <!-- Цена товара -->
                                             <!--<xsl:if test="1=0">-->
                                                <div style="margin-top: 5px">
                                                   <b>                                                      <xsl:choose>
                                                         <xsl:when test="price_discount != 0">
                                                            <!--<span style="font-size: 11pt">-->
                                                               <xsl:variable name="price" select="price_discount"/>
                                                               <xsl:value-of select="format-number($price, '### ##0,00', 'my')"/>&#xA0;<xsl:value-of disable-output-escaping="yes" select="currency"/>
                                                               
                                                               <!--</span>-->
                                                         </xsl:when>
                                                         <xsl:otherwise>
                                                            <!--<span style="font-size: 11pt">-->
                                                               Цена договорная
                                                               <!--</span>-->
                                                         </xsl:otherwise>
                                                      </xsl:choose>
                                                   </b>
                                                </div>
                                                <!--</xsl:if>-->
                                             
                                             
                                          </div>
                                       </div>
                                    </div>
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
            <!-- Перевод строки после каждого 3-го элемента -->
            <xsl:if test="((position() - 3) mod 3 = 0) and position() != last()">
               <xsl:text disable-output-escaping="yes">
                  &lt;/div&gt;
                  &lt;div class="wrapper"&gt;
               </xsl:text>
            </xsl:if>
            
         </xsl:template>
         
      </xsl:stylesheet>

Как мне сделать так, что бы выводились объекты из всех групп и подгрупп, а не только из одной?
Авторизация