Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 70.44 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE xsl:stylesheet [
  3.  <!ENTITY nbsp "&#x00A0;">
  4. ]>
  5. <xsl:stylesheet
  6.  version="1.0"
  7.  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  8.  xmlns:msxml="urn:schemas-microsoft-com:xslt"
  9.  xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:UmbracoHelper="urn:UmbracoHelper"
  10.  exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets UmbracoHelper ">
  11.  
  12.   <xsl:decimal-format name="euro"
  13.  decimal-separator="," grouping-separator="."/>
  14.   <xsl:output method="html" omit-xml-declaration="yes"/>
  15.   <xsl:param name="currentPage"/>
  16.  
  17.   <xsl:variable name ="Objectid" select="umbraco.library:RequestQueryString('objectid')"/>
  18.   <xsl:variable name ="Method" select="umbraco.library:RequestQueryString('method')"/>
  19.  
  20.   <!--Vriendendienst wijziging-->
  21.   <!--<xsl:variable name ="locatie" select="UmbracoHelper:locationId(umbraco.library:RequestQueryString('city_part'))"/>-->
  22.  
  23.   <!-- collect all city_part parts in one variable, remove duplicates -->
  24.   <xsl:variable name="city_part" select="UmbracoHelper:GetCityPartQueryString(umbraco.library:RequestQueryString('city_part'))"/>
  25.  
  26.   <xsl:variable name="stadNodeId" select="UmbracoHelper:GetStadNodeId($city_part)"/>
  27.   <xsl:variable name="stadsdeelNodeId" select="UmbracoHelper:GetStadsdeelNodeId($city_part)"/>
  28.  
  29.   <xsl:variable name="locationtype">
  30.     <xsl:choose>
  31.       <xsl:when test="number($stadNodeId) != 0">Stad</xsl:when>
  32.       <xsl:otherwise>Stadsdeel</xsl:otherwise>      
  33.     </xsl:choose>
  34.   </xsl:variable>
  35.  
  36.   <xsl:variable name="parent" select="umbraco.library:GetXmlNodeById($locatie)" />
  37.  
  38.   <xsl:variable name ="locatie">
  39.     <xsl:choose>
  40.         <xsl:when test="$currentPage/@nodeName != 'Vriendendienst'" >
  41.             <xsl:value-of select="UmbracoHelper:LocationId(umbraco.library:Replace($city_part,'_',','))"/>
  42.         </xsl:when>
  43.         <xsl:when test="$currentPage/@nodeName = 'Vriendendienst'" >
  44.             <xsl:value-of select="UmbracoHelper:LocationId(4142)"/>
  45.         </xsl:when>
  46.     </xsl:choose>
  47.   </xsl:variable>
  48.  
  49.   <!--Vriendendienst end-->
  50.     <xsl:variable name ="straat">
  51.         <xsl:choose>
  52.             <xsl:when test="$currentPage/@nodeName != 'Vriendendienst'" >
  53.                 <xsl:value-of select="translate(UmbracoHelper:LocationId(umbraco.library:RequestQueryString('streetname')),'+',' ')"/>
  54.             </xsl:when>
  55.             <xsl:when test="$currentPage/@nodeName = 'Vriendendienst'" >
  56.                 <xsl:value-of select="''"/>
  57.             </xsl:when>
  58.         </xsl:choose>
  59.     </xsl:variable>
  60.    
  61.    
  62.     <xsl:variable name ="sort_by" select="umbraco.library:RequestQueryString('sort_by')"/>
  63.  
  64.  
  65.     <xsl:variable name ="objectTypeConstruction" select="umbraco.library:RequestQueryString('type')"/>
  66.     <!--Vriendendienst-->
  67.     <xsl:variable name ="objectsoort" select="umbraco.library:RequestQueryString('soort')"/>
  68.  
  69.     <xsl:variable name ="koopprijsvan">
  70.         <xsl:choose>
  71.             <xsl:when test="$currentPage/@nodeName != 'Vriendendienst'" >
  72.                 <xsl:value-of select="umbraco.library:RequestQueryString('range_koop_min')"/>
  73.             </xsl:when>
  74.             <xsl:when test="$currentPage/@nodeName = 'Vriendendienst'" >
  75.                 <xsl:value-of select="$currentPage/slid_koop_min_value_init"/>
  76.             </xsl:when>
  77.         </xsl:choose>
  78.    </xsl:variable>
  79.    
  80.     <xsl:variable name ="koopprijstot">
  81.         <xsl:choose>
  82.             <xsl:when test="$currentPage/@nodeName != 'Vriendendienst'" >
  83.                 <xsl:value-of select="umbraco.library:RequestQueryString('range_koop_max')"/>
  84.             </xsl:when>
  85.             <xsl:when test="$currentPage/@nodeName = 'Vriendendienst'" >
  86.                 <xsl:value-of select="$currentPage/slid_koop_max_value_init"/>
  87.             </xsl:when>
  88.         </xsl:choose>
  89.     </xsl:variable>
  90.    
  91.     <xsl:variable name ="huurprijsvan">
  92.         <xsl:choose>
  93.             <xsl:when test="$currentPage/@nodeName != 'Vriendendienst'" >
  94.                 <xsl:value-of select="umbraco.library:RequestQueryString('range_huur_min')"/>
  95.             </xsl:when>
  96.             <xsl:when test="$currentPage/@nodeName = 'Vriendendienst'" >
  97.                 <xsl:value-of select="$currentPage/slid_huur_min_value_init"/>
  98.             </xsl:when>
  99.         </xsl:choose>
  100.     </xsl:variable>
  101.  
  102.  
  103.     <xsl:variable name ="huurprijstot">
  104.         <xsl:choose>
  105.             <xsl:when test="$currentPage/@nodeName != 'Vriendendienst'" >
  106.                 <xsl:value-of select="umbraco.library:RequestQueryString('range_huur_max')"/>
  107.             </xsl:when>
  108.             <xsl:when test="$currentPage/@nodeName = 'Vriendendienst'" >
  109.                 <xsl:value-of select="$currentPage/slid_huur_max_value_init"/>
  110.             </xsl:when>
  111.         </xsl:choose>
  112.     </xsl:variable>
  113. <!--Vriendendienst end-->    
  114.   <!--<xsl:variable name ="koopprijsvan" select="umbraco.library:RequestQueryString('range_koop_min')"/>-->
  115.   <!--<xsl:variable name ="koopprijstot" select="umbraco.library:RequestQueryString('range_koop_max')"/>-->
  116.   <!--<xsl:variable name ="huurprijsvan" select="umbraco.library:RequestQueryString('range_huur_min')"/>
  117.  <xsl:variable name ="huurprijstot" select="umbraco.library:RequestQueryString('range_huur_max')"/>-->
  118.  
  119.   <xsl:variable name ="oppervlakte" select="umbraco.library:RequestQueryString('oppervlakte')"/>
  120.   <xsl:variable name ="minoppervlakte" select="umbraco.library:RequestQueryString('minoppervlakte')"/>
  121.   <xsl:variable name ="maxoppervlakte" select="umbraco.library:RequestQueryString('maxoppervlakte')"/>
  122.  
  123.   <xsl:variable name ="aantalkamers" select="umbraco.library:RequestQueryString('kamers')"/>
  124.   <xsl:variable name ="etage" select="umbraco.library:RequestQueryString('etage')"/>
  125.   <xsl:variable name ="beschikbaarper" select="umbraco.library:RequestQueryString('beschikbaarper')"/>
  126.  
  127.   <xsl:variable name ="tuin" select="umbraco.library:RequestQueryString('Tuin')"/>
  128.   <xsl:variable name ="balkon" select="umbraco.library:RequestQueryString('Balkon')"/>
  129.   <xsl:variable name ="garage" select="umbraco.library:RequestQueryString('Garage')"/>
  130.   <xsl:variable name ="berging" select="umbraco.library:RequestQueryString('Berging')"/>
  131.  
  132.   <xsl:variable name ="parkeertype" select="umbraco.library:RequestQueryString('parkeertype')"/>
  133.  
  134.   <xsl:variable name ="cv" select="umbraco.library:RequestQueryString('CV')"/>
  135.  
  136.  
  137.   <xsl:variable name="PageUrlQueryString">    
  138.     <xsl:text>sort_by=</xsl:text><xsl:value-of select="$sort_by"/>
  139.     <xsl:text><![CDATA[&]]>city_part=</xsl:text><xsl:value-of select="$city_part"/>
  140.     <xsl:text><![CDATA[&]]>type=</xsl:text><xsl:value-of select="$objectTypeConstruction"/>
  141.     <xsl:text><![CDATA[&]]>soort=</xsl:text><xsl:value-of select="$objectsoort"/>
  142.     <xsl:text><![CDATA[&]]>oppervlakte=</xsl:text><xsl:value-of select="$oppervlakte"/>
  143.     <xsl:text><![CDATA[&]]>minoppervlakte=</xsl:text><xsl:value-of select="$minoppervlakte"/>
  144.     <xsl:text><![CDATA[&]]>maxoppervlakte=</xsl:text><xsl:value-of select="$maxoppervlakte"/>
  145.     <xsl:text><![CDATA[&]]>kamers=</xsl:text><xsl:value-of select="$aantalkamers"/>
  146.     <xsl:text><![CDATA[&]]>etage=</xsl:text><xsl:value-of select="$etage"/>
  147.     <xsl:text><![CDATA[&]]>beschikbaarper=</xsl:text><xsl:value-of select="$beschikbaarper"/>
  148.     <xsl:text><![CDATA[&]]>tuin=</xsl:text><xsl:value-of select="$tuin"/>
  149.     <xsl:text><![CDATA[&]]>balkon=</xsl:text><xsl:value-of select="$balkon"/>
  150.     <xsl:text><![CDATA[&]]>berging=</xsl:text><xsl:value-of select="$berging"/>
  151.     <xsl:text><![CDATA[&]]>garage=</xsl:text><xsl:value-of select="$garage"/>
  152.     <xsl:text><![CDATA[&]]>parkeertype=</xsl:text><xsl:value-of select="$parkeertype"/>
  153.     <xsl:text><![CDATA[&]]>cv=</xsl:text><xsl:value-of select="$cv"/>
  154.   </xsl:variable>
  155.  
  156.   <!--Vriendendienst-->
  157.     <xsl:variable name ="huuron">
  158.         <xsl:choose>
  159.             <xsl:when test="$currentPage/@nodeName != 'Vriendendienst'" >
  160.                 <xsl:value-of select="umbraco.library:RequestQueryString('huur')"/>
  161.             </xsl:when>
  162.             <xsl:when test="$currentPage/@nodeName = 'Vriendendienst'" >
  163.                 <xsl:value-of select="no"/>
  164.             </xsl:when>
  165.         </xsl:choose>
  166.     </xsl:variable>
  167.     <xsl:variable name ="koopon">
  168.         <xsl:choose>
  169.             <xsl:when test="$currentPage/@nodeName != 'Vriendendienst'" >
  170.                 <xsl:value-of select="umbraco.library:RequestQueryString('koop')"/>
  171.             </xsl:when>
  172.             <xsl:when test="$currentPage/@nodeName = 'Vriendendienst'" >
  173.                 <xsl:value-of select="$currentPage/slidKoopEnabled"/>
  174.             </xsl:when>
  175.         </xsl:choose>
  176.     </xsl:variable>
  177.  <!--Vriendendienst end-->  
  178.   <!--<xsl:variable name ="koopon" select="umbraco.library:RequestQueryString('koop')"/>
  179.  <xsl:variable name ="huuron" select="umbraco.library:RequestQueryString('huur')"/>-->
  180.    
  181.  
  182.  
  183. <!--  <xsl:variable name="parent" select="umbraco.library:GetXmlNodeById($locatie)" /> -->
  184. <!--  <xsl:variable name="locationtype" select="name($parent)"/> -->
  185.  
  186.   <xsl:variable name="subhome" select="$currentPage/@nodeName"/>
  187.  
  188.   <xsl:variable name="subhome_json" select="umbraco.library:RequestQueryString('subhome_json')" />
  189.   <xsl:variable name="subhome_category">
  190.     <xsl:choose>
  191.         <!--Vriendendienst wijziging-->
  192.       <xsl:when test="($subhome='Wonen' or $subhome_json='Wonen' or $subhome='Vriendendienst' or $subhome_json='Vriendendienst' )">Wonen</xsl:when>
  193.       <xsl:when test="($subhome='Ondernemen' or $subhome_json='Ondernemen')">Ondernemen</xsl:when>
  194.       <xsl:when test="($subhome='Parkeren' or $subhome_json='Parkeren')">Parkeren</xsl:when>
  195.     </xsl:choose>
  196.   </xsl:variable>
  197.  
  198.   <xsl:template match="/">
  199.     <xsl:variable name="resultset" select="/macro/Modus" />
  200.     <xsl:variable name="objecten" select="umbraco.library:GetXmlNodeById($locatie)/descendant::*
  201.                  [
  202.                    ((name()='Huurwoning' and $huuron!='' and ($subhome_category='Wonen' or $subhome_category = 'Vriendendienst')) or (name()='Koopwoning' and $koopon!='' and ($subhome_category='Wonen' or $subhome_category = 'Vriendendienst')))
  203.                    or
  204.                    ((name()='Huurbedrijfsruimte' and $huuron!='' and $subhome_category='Ondernemen') or (name()='Koopbedrijfsruimte' and $koopon!='' and $subhome_category='Ondernemen'))
  205.                    or
  206.                    ((name()='Huurparkeerplaats'  and $huuron!='' and $subhome_category='Parkeren') or (name()='Koopparkeerplaats' and $koopon!='' and $subhome_category='Parkeren'))
  207.                  ]
  208.                  [
  209.                    (starts-with(name(),'Koop')
  210.                    and
  211.                    ((objectPriceFrom &gt;= $koopprijsvan and $koopprijsvan !='') or ($koopprijsvan =''))
  212.                    and
  213.                    ((objectPriceFrom &lt;= $koopprijstot and $koopprijstot !='') or ($koopprijstot =''))
  214.                    )
  215.                    or
  216.                    (starts-with(name(),'Huur')
  217.                    and
  218.                    ((objectNetRent &gt;= $huurprijsvan and $huurprijsvan !='')  or ($huurprijsvan =''))
  219.                    and
  220.                    ((objectNetRent &lt;= $huurprijstot and $huurprijstot !='')  or ($huurprijstot =''))
  221.                    )
  222.                  ]
  223.                  [(normalize-space(objectAddressStreet) = $straat or $straat = '')
  224.                  ]
  225.                  [
  226.                  (contains(objectFloor,$etage) and $etage !='') or ($etage ='')
  227.                  ]
  228.                  [
  229.                  (
  230.                  (($tuin ='') and ($balkon ='') and ($berging ='') and ($garage =''))
  231.                  or
  232.                  (objectGarden='1' and $tuin !='')
  233.                  or
  234.                  (objectBalcony ='1' and $balkon !='')
  235.                  or
  236.                  (objectStorage !='' and $berging !='')
  237.                  or
  238.                  ($garage !='' and objectGarage != ''and objectGarage != '118')
  239.                  )
  240.                  ]
  241.                  [
  242.                  ((objectChambersFrom=$aantalkamers or ($aantalkamers=5 and objectChambersFrom &gt; $aantalkamers))  and $aantalkamers !='') or ($aantalkamers ='')
  243.                  ]
  244.                  [
  245.                  (((objectLivingSurfaceFrom &lt;=50 and $oppervlakte=0) or (objectLivingSurfaceFrom &gt;=$oppervlakte and $oppervlakte!=0))  or $oppervlakte='')
  246.                  ]
  247.                  
  248.                  [
  249.                  (contains(objectTypeConstruction,$objectTypeConstruction) and $objectTypeConstruction !='') or ($objectTypeConstruction ='')
  250.                  ]
  251.                  [
  252.                  (contains(objectSort,$objectsoort)  and $objectsoort !='') or ($objectsoort ='')
  253.                  ]
  254.                  [
  255.                  (contains(typeStorage,$parkeertype)  and $parkeertype !='') or ($parkeertype ='')
  256.                  ]
  257.                  [@isDoc and string(umbracoNaviHide) != '1']
  258.                  
  259.                  
  260.                  "/>
  261.                 <xsl:variable name="objectenfromprofile" select="umbraco.library:GetXmlNodeById(1268)/descendant::*
  262.                  [
  263.                    name()='Koopwoning'
  264.                  ]
  265.                  
  266.                  [
  267.                    (
  268.                    ((objectPriceFrom &gt;= $koopprijsvan and $koopprijsvan !='') or ($koopprijsvan =''))
  269.                    and
  270.                    ((objectPriceFrom &lt;= $koopprijstot and $koopprijstot !='') or ($koopprijstot =''))
  271.                    )
  272.                  ]
  273.                  
  274.                  [
  275.                  ((objectLivingSurfaceFrom &gt;=$minoppervlakte)  or $minoppervlakte='')
  276.                  ]
  277.                  
  278.                  [
  279.                  ((objectLivingSurfaceFrom &lt;=$maxoppervlakte)  or $maxoppervlakte='')
  280.                  ]
  281.                  [
  282.                  (objectChambersFrom &gt;= $aantalkamers  and $aantalkamers !='') or ($aantalkamers ='')
  283.                  ]
  284.                  [
  285.                  (contains($objectTypeConstruction,objectTypeConstruction) and $objectTypeConstruction !='') or ($objectTypeConstruction ='')
  286.                  ]
  287.                  [
  288.                  (contains($objectsoort,objectSort)  and $objectsoort !='') or ($objectsoort ='')
  289.                  ]
  290.                  [
  291.                    (
  292.                      (($tuin ='') and ($balkon ='') and ($berging ='') and ($garage =''))
  293.                      or
  294.                      (objectGarden='1' and $tuin !='')
  295.                      or
  296.                      (objectBalcony ='1' and $balkon !='')
  297.                      or
  298.                      (objectStorage !='' and $berging !='')
  299.                      or
  300.                      (objectGarage != '' and objectGarage != '118' and $garage !='')
  301.                    )
  302.                  ]
  303.                  [@isDoc and string(umbracoNaviHide) != '1']
  304.                  
  305.                  [ancestor::* [contains(@id,$locatie)]]
  306.                  
  307.                  
  308.                  "/>
  309.  
  310.     <xsl:choose>
  311.       <xsl:when test="$resultset = 'resultgrid'">
  312.         <xsl:choose>
  313.           <xsl:when test="umbraco.library:RequestQueryString('action') = 'Woningen'">
  314.             <xsl:call-template name="sortBox">
  315.               <xsl:with-param name="objecten" select="$objectenfromprofile"/>
  316.               <xsl:with-param name="hidesort" select="false"/>
  317.  
  318.             </xsl:call-template>
  319.             <xsl:call-template name="result-grid">
  320.               <xsl:with-param name="objecten" select="$objectenfromprofile"/>
  321.             </xsl:call-template>
  322.           </xsl:when>
  323.           <xsl:otherwise>
  324.             <xsl:call-template name="sortBox">
  325.               <xsl:with-param name="objecten" select="$objecten"/>
  326.             </xsl:call-template>
  327.             <xsl:call-template name="result-grid">
  328.               <xsl:with-param name="objecten" select="$objecten"/>
  329.             </xsl:call-template>            
  330.           </xsl:otherwise>
  331.         </xsl:choose>
  332.       </xsl:when>
  333.       <xsl:when test="$resultset = 'json-search'">
  334.         <xsl:choose>
  335.           <!--If the method is facetcount then create the facet count json in the included template-->
  336.           <xsl:when test="$Method = 'facetCount'">
  337.             <xsl:call-template name="json-facetcount">
  338.               <xsl:with-param name="objecten" select="$objecten"/>
  339.             </xsl:call-template>
  340.           </xsl:when>
  341.           <xsl:otherwise>
  342.             <xsl:call-template name="json-search">
  343.               <xsl:with-param name="objecten" select="$objecten"/>
  344.             </xsl:call-template>
  345.           </xsl:otherwise>
  346.         </xsl:choose>
  347.       </xsl:when>
  348.       <xsl:when test="$resultset = 'facets'">
  349.         <xsl:call-template name="facets">
  350.           <xsl:with-param name="objecten" select="$objecten"/>
  351.         </xsl:call-template>
  352.       </xsl:when>
  353.       <xsl:when test="$resultset = 'googlemapobjects'">
  354.         <xsl:call-template name="googlemapobjects">
  355.           <xsl:with-param name="objecten" select="$objecten"/>
  356.         </xsl:call-template>
  357.       </xsl:when>
  358.       <xsl:when test="$resultset = 'breadcrumb'">
  359.         <xsl:call-template name="breadcrumb">
  360.         </xsl:call-template>
  361.       </xsl:when>
  362.       <xsl:when test="$resultset = 'blockfilterpanel'">
  363.         <xsl:call-template name="blockfilterpanel"/>
  364.       </xsl:when>
  365.     </xsl:choose>
  366.   </xsl:template>
  367.   <xsl:template name="sortBox" >
  368.     <xsl:param name="objecten" />
  369.     <xsl:param name="hidesort" />
  370.    
  371.     <section class="title-sorting-wrapper clearfix">
  372.       <h1>
  373.         <xsl:value-of select="count($objecten)"/>&nbsp; resultaten
  374.       </h1>
  375.       <xsl:if test="$hidesort !='true'">
  376.       <div class="form-element clearfix">
  377.         <label for="sorting">Sorteer op</label>
  378.         <select name="sort_by" id="sorting" class="ui_addToFilterForm {{form: '#filter_form'}}">
  379.           <option>
  380.             <xsl:attribute name="value">
  381.               <xsl:value-of select="UmbracoHelper:prevaluesWrapper($currentPage/sortoption1)"/>
  382.             </xsl:attribute>
  383.             <xsl:value-of select="UmbracoHelper:prevaluesWrapper($currentPage/sortoption1)"/>
  384.           </option>
  385.           <option>
  386.             <xsl:attribute name="value">
  387.               <xsl:value-of select="UmbracoHelper:prevaluesWrapper($currentPage/sortoption2)"/>
  388.             </xsl:attribute>
  389.             <xsl:value-of select="UmbracoHelper:prevaluesWrapper($currentPage/sortoption2)"/>
  390.           </option>
  391.             <xsl:if test ="$currentPage/sortoption3 != ''">
  392.           <option>
  393.             <xsl:attribute name="value">
  394.               <xsl:value-of select="UmbracoHelper:prevaluesWrapper($currentPage/sortoption3)"/>
  395.             </xsl:attribute>
  396.             <xsl:value-of select="UmbracoHelper:prevaluesWrapper($currentPage/sortoption3)"/>
  397.           </option>
  398.             </xsl:if>
  399.         </select>
  400.       </div>
  401.       </xsl:if>
  402.     </section>
  403.   </xsl:template>
  404.   <xsl:template name="result-grid">
  405.     <xsl:param name="objecten" />
  406.    
  407.     <section id="search-result" class="load-on-filder">
  408.       <ul>
  409.         <xsl:for-each select="$objecten">
  410.           <xsl:sort select="UmbracoHelper:GetAanbodOrder(UmbracoHelper:prevaluesWrapper(./objectState))" order="ascending" data-type="number"/>
  411.  
  412.           <xsl:sort select="./objectChambersFrom  [string($sort_by) = 'Aantal kamers']" data-type="number"  order="descending"/>
  413.           <xsl:sort select="./objectLivingSurfaceFrom  [string($sort_by) = 'Oppervlakte']" data-type="number"  order="descending"/>
  414.           <xsl:sort select="./@updateDate  [string($sort_by) = 'Datum' or string($sort_by) = '']" data-type="text"  order="descending"/>
  415.           <xsl:sort select="./objectPriceFrom  [string($sort_by) = 'Prijs']" data-type="number"  order="descending"/>
  416.           <xsl:sort select="./objectNetRent  [string($sort_by) = 'Prijs']" data-type="number"  order="descending"/>
  417.           <xsl:sort select="./objectYear  [string($sort_by) = 'Bouwjaar']" data-type="number"  order="descending"/>
  418.           <xsl:sort select="./objectTypeType  [string($sort_by) = 'Type bouw']" data-type="text"  order="descending"/>
  419.           <xsl:sort select="./nodeName  [string($sort_by) = 'Straatnaam']" data-type="text"  order="ascending"/>
  420.  
  421.           <xsl:if test="position() = 3">
  422.               <xsl:call-template name="randombanner">
  423.                 <xsl:with-param  name="output">html</xsl:with-param>
  424.                 <xsl:with-param  name="subhome_category" select="$subhome_category"/>
  425.               </xsl:call-template>
  426.           </xsl:if>
  427.          
  428.           <li class="object-listitem-search clearfix">
  429.             <xsl:variable name="image" select="./objectPhoto1" />
  430.             <xsl:if test="$image != ''">
  431.                   <img width="100" height="80">
  432.                     <xsl:attribute name="src">
  433.                       <xsl:text>/umbraco/ImageGen.ashx?image=</xsl:text>
  434.                       <xsl:value-of select="umbraco.library:GetMedia($image, 'false')/umbracoFile"/>
  435.                       <xsl:text>&amp;class=ObjectOverviewTumbnail</xsl:text>
  436.                     </xsl:attribute>
  437.                     <xsl:attribute name="alt">
  438.                       <xsl:value-of select="@nodeName"/>
  439.                     </xsl:attribute>
  440.                   </img>
  441.  
  442.             </xsl:if>
  443.             <xsl:if test="$image = ''">
  444.               <img width="100" height="80" src="/static/gfx/leeg.gif"/>
  445.             </xsl:if>
  446.             <div class="object-content">
  447.               <h3>                
  448.                 <a href="{umbraco.library:NiceUrl(@id)}" title="object titel">
  449.                  <xsl:value-of select="./@nodeName"/>
  450.                 </a>
  451.               </h3>
  452.               <ul class="object-info">
  453.                 <li>
  454.                   <xsl:value-of select="./objectPostalcode"/>&nbsp;
  455.                   <xsl:value-of select="./ancestor::*[name()='Stad']/@nodeName" disable-output-escaping="yes"/>
  456.                 </li>
  457.                 <xsl:if test="contains(name(.), 'woning') or contains(name(.), 'ruimte')">
  458.                 <li>
  459.                   <xsl:if test="./objectTypeType !=''">
  460.                         <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectTypeType)" />
  461.                   </xsl:if>
  462.                   <xsl:if test="./objectLivingSurfaceFrom !=''">,
  463.                     <xsl:if test="./oppervlaktePrefix != ''">
  464.                       <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./oppervlaktePrefix)"/>
  465.                   </xsl:if>
  466.                     <xsl:text>&nbsp;</xsl:text>
  467.                       <xsl:value-of select="./objectLivingSurfaceFrom"  />m<sup>2</sup>
  468.                   </xsl:if>
  469.                   <xsl:if test="./objectChambersFrom !=''">
  470.                     &#x2013; <xsl:value-of select="./objectChambersFrom"/> kamers
  471.                   </xsl:if>
  472.                 </li>
  473.                 </xsl:if>
  474.  
  475.                 <li>
  476.                   <xsl:if test="./objectState != ''">
  477.                       <xsl:choose>
  478.                           <xsl:when test="UmbracoHelper:prevaluesWrapper(./objectState) = 'Te huur'">
  479.                               <em class="objectStatusGreen">
  480.                                   <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectState)" />
  481.                               </em>
  482.                           </xsl:when>
  483.                           <xsl:when test="UmbracoHelper:prevaluesWrapper(./objectState) = 'Binnenkort in de verhuur'">
  484.                               <em class="objectStatusGreen">
  485.                                   <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectState)" />
  486.                               </em>
  487.                           </xsl:when>
  488.                           <xsl:when test="UmbracoHelper:prevaluesWrapper(./objectState) = 'Te koop'">
  489.                               <em class="objectStatusGreen">
  490.                                   <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectState)" />
  491.                               </em>
  492.                           </xsl:when>
  493.                           <xsl:when test="UmbracoHelper:prevaluesWrapper(./objectState) = 'Binnenkort in de verkoop'">
  494.                               <em class="objectStatusGreen">
  495.                                   <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectState)" />
  496.                               </em>
  497.                           </xsl:when>
  498.                           <xsl:when test="UmbracoHelper:prevaluesWrapper(./objectState) = 'Verhuurd onder voorbehoud'">
  499.                               <em class="objectStatusRed">
  500.                                   <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectState)" />
  501.                               </em>
  502.                           </xsl:when>
  503.                           <xsl:when test="UmbracoHelper:prevaluesWrapper(./objectState) = 'Verhuurd'">
  504.                               <em class="objectStatusRed">
  505.                                   <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectState)" />
  506.                               </em>
  507.                           </xsl:when>
  508.                           <xsl:when test="UmbracoHelper:prevaluesWrapper(./objectState) = 'Verkocht onder voorbehoud'">
  509.                               <em class="objectStatusRed">
  510.                                   <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectState)" />
  511.                               </em>
  512.                           </xsl:when>
  513.                           <xsl:when test="UmbracoHelper:prevaluesWrapper(./objectState) = 'Verkocht'">
  514.                               <em class="objectStatusRed">
  515.                                   <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectState)" />
  516.                               </em>
  517.                           </xsl:when>
  518.                           <xsl:otherwise>
  519.                               <em>
  520.                                   <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectState)" />
  521.                               </em>
  522.                           </xsl:otherwise>
  523.                       </xsl:choose>
  524.                   </xsl:if>
  525.                 </li>
  526.                 <xsl:choose>
  527.                   <xsl:when test="count(./actieLink/links/link) > 0">
  528.                     <li>
  529.                       <a>
  530.                         <xsl:if test="./actieLink/links/link/@newwindow = '1'">
  531.                           <xsl:attribute name="target">
  532.                             <xsl:text>_blank</xsl:text>
  533.                           </xsl:attribute>
  534.                         </xsl:if>
  535.                         <xsl:attribute name="href">
  536.                           <xsl:choose>
  537.                             <xsl:when test="./actieLink/links/link/@type = 'external'">
  538.                               <xsl:value-of select="./actieLink/links/link/@link" disable-output-escaping="yes"/>
  539.                             </xsl:when>
  540.                             <xsl:otherwise>
  541.                               <xsl:value-of select="umbraco.library:NiceUrl(./actieLink/links/link/@link)" disable-output-escaping="yes"/>
  542.                             </xsl:otherwise>
  543.                           </xsl:choose>
  544.                         </xsl:attribute>
  545.                         <xsl:value-of select="./actieLink/links/link/@title" disable-output-escaping="yes"/>
  546.                       </a>
  547.                     </li>
  548.                   </xsl:when>
  549.                   <xsl:otherwise>
  550.                     <xsl:if test="./actieTekst != ''">
  551.                       <li>
  552.                         <em class="objectStatusGreen">
  553.                           <xsl:value-of select="./actieTekst" disable-output-escaping="yes"/>
  554.                         </em>
  555.                       </li>
  556.                     </xsl:if>
  557.                   </xsl:otherwise>
  558.                 </xsl:choose>
  559.               </ul>
  560.             </div>
  561.             <div class="object-meta">
  562.               <div class="object-price">
  563.                 <xsl:choose>
  564.                   <xsl:when test="starts-with(name(),'Huur')">
  565.                    
  566.                     <xsl:if test="./huurprijsPrefix != ''">
  567.                       <xsl:value-of select="UmbracoHelper:prevaluesWrapper(./huurprijsPrefix)"/>
  568.                     </xsl:if>
  569.                     &nbsp;&#x20ac;
  570.                     <xsl:value-of select="format-number(UmbracoHelper:ConvertToDouble(./objectNetRent, ./objectNetRentDecimal), '###.###,00', 'euro')" />
  571.                   </xsl:when>
  572.                   <xsl:otherwise>
  573.                     &#x20ac; <xsl:value-of select="format-number(UmbracoHelper:ConvertToDouble(./objectPriceFrom, ./objectNetRentDecimal), '###.###','euro')"/>
  574.                   </xsl:otherwise>
  575.                 </xsl:choose>
  576.               </div>
  577.               <div class="icondata">
  578.                 <xsl:call-template name="RenderIcons">
  579.                   <xsl:with-param name="iconData" select="./actieIconen"/>
  580.                   <xsl:with-param name="output" select="searchHtml"/>  
  581.                 </xsl:call-template>
  582.               </div>
  583.             </div>
  584.           </li>
  585.         </xsl:for-each>
  586.       </ul>
  587.     </section>
  588.   </xsl:template>
  589.   <xsl:template name="json-search">
  590.     <xsl:param name="objecten" />
  591.     <xsl:value-of select="umbraco.library:ChangeContentType('application/json')"/>
  592.     [
  593.     <xsl:for-each select="$objecten">
  594.       <xsl:sort select="UmbracoHelper:GetAanbodOrder(UmbracoHelper:prevaluesWrapper(./objectState))" order="ascending" data-type="number"/>
  595.  
  596.       <xsl:sort select="./objectChambersFrom  [string($sort_by) = 'Aantal kamers']" data-type="number"  order="descending"/>
  597.       <xsl:sort select="./objectLivingSurfaceFrom  [string($sort_by) = 'Oppervlakte']" data-type="number"  order="descending"/>
  598.       <xsl:sort select="./@updateDate  [string($sort_by) = 'Datum' or string($sort_by) = '']" data-type="text"  order="descending"/>
  599.       <xsl:sort select="./objectPriceFrom  [string($sort_by) = 'Prijs']" data-type="number"  order="descending"/>
  600.       <xsl:sort select="./objectNetRent  [string($sort_by) = 'Prijs']" data-type="number"  order="descending"/>
  601.       <xsl:sort select="./objectYear  [string($sort_by) = 'Bouwjaar']" data-type="number"  order="descending"/>
  602.       <xsl:sort select="./objectTypeType  [string($sort_by) = 'Type bouw']" data-type="text"  order="descending"/>
  603.       <xsl:sort select="./@nodeName  [string($sort_by) = 'Straatnaam']" data-type="text"  order="ascending"/>
  604.       <xsl:if test="position() = 3">
  605.         ,<xsl:call-template name="randombanner">
  606.           <xsl:with-param name="output">json</xsl:with-param>
  607.           <xsl:with-param name="subhome_category" select="$subhome_category"/>
  608.         </xsl:call-template>
  609.       </xsl:if>
  610.       <xsl:if test="position()!=1">
  611.         <xsl:text>,</xsl:text>
  612.       </xsl:if>
  613.         {"title":"<xsl:value-of select="@nodeName"/>"<xsl:if test="./objectGarden != null">,"Tuin":<xsl:value-of select="./objectGarden"/></xsl:if><xsl:if test="./huurprijsPrefix != ''">,"HuurPrijsPrefix":"<xsl:value-of select="UmbracoHelper:prevaluesWrapper(./huurprijsPrefix)"/>"</xsl:if>,"Balkon":"<xsl:value-of select="./objectBalcony"/>","Berging":"<xsl:value-of select="./objectStorage"/>","Garage":"<xsl:value-of select="(./objectGarage )"/><xsl:value-of select="@nodeName"/>","img_url":"<xsl:if test="./objectPhoto1 !=''"><xsl:text>/umbraco/ImageGen.ashx?image=</xsl:text><xsl:value-of select="umbraco.library:GetMedia(./objectPhoto1, 'false')/umbracoFile"/><xsl:text></xsl:text></xsl:if>","page_url":"<xsl:value-of select="normalize-space(umbraco.library:NiceUrl(@id))"/>?<xsl:value-of select="$PageUrlQueryString"/>","postcode":"<xsl:value-of select="./objectPostalcode"/>","stad":"amsterdam","woonoppervlakte":"<xsl:value-of select="./objectLivingSurfaceFrom"/>","kamers":"<xsl:value-of select="./objectChambersFrom"/>","prijs":"<xsl:choose>
  614.           <xsl:when test="starts-with(name(),'Huur')">
  615.             <xsl:value-of select="format-number(UmbracoHelper:ConvertToDouble(./objectNetRent, ./objectNetRentDecimal), '###.###,00','euro')" />
  616.           </xsl:when>
  617.           <xsl:otherwise>
  618.           <xsl:value-of select="format-number(UmbracoHelper:ConvertToDouble(./objectPriceFrom, ./objectNetRentDecimal), '###.###','euro')"/></xsl:otherwise>
  619.         </xsl:choose>","objecttypen":"<xsl:if test="./objectTypeType !=''"><xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectTypeType)" /></xsl:if>","objectstatus":"<xsl:if test="./objectState !=''"><xsl:value-of select="UmbracoHelper:prevaluesWrapper(./objectState)" /></xsl:if>",<xsl:value-of disable-output-escaping="yes" select="UmbracoHelper:CreateActionLink(./actieTekst,./actieLink/links/link/@type,./actieLink/links/link/@link,./actieLink/links/link/@title,./actieLink/links/link/@newwindow)" />,"Icons": [<xsl:call-template name="RenderIcons"><xsl:with-param name="iconData" select="./actieIconen"></xsl:with-param><xsl:with-param name="output" select="1"></xsl:with-param></xsl:call-template>]}</xsl:for-each>]
  620.   </xsl:template>
  621.   <xsl:template name="facets">
  622.     <xsl:param name="objecten" />
  623.     <form action="/api?method=search" method="get" id="filter_form">
  624.       <input type="hidden" name="city_part" id="city_part" value="{$locatie}" />
  625.       <input type="hidden" name="subhome_json" id="subhome_json" value="{$subhome}" />
  626.       <input type="hidden" name="streetname" id="streetname" value="{$straat}" />
  627.       <h1>
  628.         Verfijn je zoekopdracht
  629.       </h1>
  630.       <section class="filter-section">
  631.         <xsl:if test="$koopon != ''">
  632.           <section class="form-element koop-of-huur clearfix">
  633.             <label>
  634.               <input type="checkbox" name="koop" id="koop_checkbox" class="checkbox ui_toggleDiv {{id: '#koop_slider'}}" checked="" />Koop
  635.             </label>
  636.           </section>
  637.           <section id="koop_slider" class="ui_filterSlider {{ kind: 'koop', min: {$koopprijsvan} , max: {$koopprijstot}, val1:  {$koopprijsvan}, val2:  {$koopprijstot}, step: 1 }}">
  638.             <div class="slider-amount">
  639.               prijs <span></span>
  640.             </div>
  641.             <div class="slider"></div>
  642.             <div class="slider-info">&nbsp;</div>
  643.             <input type="hidden" id="range_koop_min" name="range_koop_min" value="" />
  644.             <input type="hidden" id="range_koop_max" name="range_koop_max" value="" />
  645.           </section>
  646.         </xsl:if>
  647.         <xsl:if test="$huuron != ''">
  648.           <section class="form-element koop-of-huur clearfix">
  649.             <label>
  650.               <input type="checkbox" name="huur" id="huur_checkbox" class="checkbox ui_toggleDiv {{id: '#huur_slider'}}" checked="" />Huur
  651.             </label>
  652.           </section>
  653.           <section id="huur_slider" class="ui_filterSlider {{ kind: 'huur',min: {$huurprijsvan} , max: {$huurprijstot}, val1:  {$huurprijsvan}, val2:  {$huurprijstot}, step: 1 }}">
  654.             <div class="slider-amount">
  655.               prijs <span></span>
  656.             </div>
  657.             <div class="slider"></div>
  658.             <div class="slider-info">(per maand)</div>
  659.             <input type="hidden" id="range_huur_min" name="range_huur_min" value="" />
  660.             <input type="hidden" id="range_huur_max" name="range_huur_max" value="" />
  661.           </section>
  662.         </xsl:if>
  663.       </section>
  664.       <xsl:if test="$koopon!='' and umbraco.library:Session('email') = '' and contains($currentPage/@nodeName,'Wonen')">
  665.        
  666.       <section id="zoekprofielsection" class="zoekprofiel">
  667.         <xsl:variable name="zoekprofiel" select="$currentPage/ancestor-or-self::root/descendant::* [name() = 'ZoekProfielContainer']"/>
  668.         <xsl:if test="$koopon !=''">
  669.           <xsl:attribute name="style">
  670.             <xsl:text disable-output-escaping="yes">style="display: none;"</xsl:text>
  671.           </xsl:attribute>
  672.         </xsl:if>
  673.         <div class="link-to-zoekprofiel">
  674.           <p class="read-more-zoek">
  675.             <xsl:variable name="QueryString" select="umbraco.library:RequestServerVariables('QUERY_STRING')"/>
  676.             <a id="zoekprofielurl" href="{umbraco.library:NiceUrl($zoekprofiel/@id)}/?action=createZoekprofiel&amp;{$QueryString}">
  677.               <xsl:value-of select="$zoekprofiel/tekstOnderSlidersZoekPagina"/> &#187;</a>
  678.           </p>
  679.         </div>
  680.        
  681.       </section>
  682.       </xsl:if>
  683.         <xsl:if test="$straat = ''">
  684.       <section class="filter-section">
  685.         <xsl:choose>
  686.           <xsl:when test="$locationtype='Stad'">
  687.             <h4>Stadsdeel</h4>
  688.             <ul>
  689.               <xsl:if test="$stadNodeId != 0">
  690.                 <xsl:variable name="selectedStad" select="umbraco.library:GetXmlNodeById($stadNodeId)"/>                            
  691.                 <xsl:variable name="Stadsdelen" select="$selectedStad/child::*[@isDoc and string(umbracoNaviHide) != '1'][name()='Stadsdeel']"/>
  692.              
  693.                 <xsl:for-each select="$Stadsdelen">
  694.                
  695.                   <xsl:variable name="selected">
  696.                     <xsl:if test="$locatie = current()/@id">selected</xsl:if>
  697.                   </xsl:variable>
  698.  
  699.                   <li class="ui_openTree">
  700.                     <xsl:attribute name="class">
  701.                       <xsl:text>ui_openTree</xsl:text>
  702.                       <xsl:if test="$locatie = current()/@id">
  703.                         <xsl:text> selected-filter</xsl:text>
  704.                       </xsl:if>
  705.                       <xsl:if test="contains(string($city_part),string(current()/@id))">
  706.                         <xsl:text> tree-opened</xsl:text>
  707.                       </xsl:if>
  708.                     </xsl:attribute>                  
  709.                  
  710.                     <xsl:if test="$locatie = current()/@id">                      
  711.                       <span class="removeFilter">x</span>
  712.                       <input type="hidden" name="city_part" value="{$stadNodeId}_{current()/@id}"/>
  713.                     </xsl:if>
  714.  
  715.                     <xsl:variable name="count">
  716.                       <xsl:call-template name="itemcount">
  717.                         <xsl:with-param name="parentNode" select="@id"/>
  718.                       </xsl:call-template>
  719.                     </xsl:variable>
  720.  
  721.                     <a href="javascript:void(0);" data-filter="city_part" data-filter-value="{$stadNodeId}_{@id}" data-filter-amount="{$count}" class="ui_selectFilter {$selected}">
  722.                       <xsl:value-of select="@nodeName"/>
  723.                     </a>&nbsp;
  724.                     <span>
  725.                       (<xsl:value-of select="$count"/>)
  726.                     </span>
  727.                  
  728.                     <ul>
  729.                       <xsl:variable name="stadsdeelId" select="current()/@id"/>
  730.                       <xsl:variable name="Buurten" select="./child::*[@isDoc and string(umbracoNaviHide) != '1']"/>
  731.  
  732.                       <xsl:for-each select="$Buurten">                      
  733.                         <xsl:call-template name="BuurtFacet">
  734.                           <xsl:with-param name="facet" select="$city_part"/>
  735.                           <xsl:with-param name="data-filter" select="string('city_part')"/>
  736.  
  737.                           <xsl:with-param name="value">
  738.                             <xsl:value-of select="string($stadNodeId)"/>_<xsl:value-of select="string($stadsdeelId)"/>_<xsl:value-of select="string(current()/@id)"/>
  739.                           </xsl:with-param>
  740.  
  741.                           <xsl:with-param name="count">
  742.                             <xsl:call-template name="itemcount">
  743.                               <xsl:with-param name="parentNode" select="@id"/>
  744.                             </xsl:call-template>
  745.                           </xsl:with-param>
  746.                           <xsl:with-param name="text" select="current()/@nodeName"/>
  747.                           <xsl:with-param name="liClass" select="string('')"/>
  748.                         </xsl:call-template>
  749.                       </xsl:for-each>
  750.                     </ul>
  751.                   </li>              
  752.                 </xsl:for-each>
  753.               </xsl:if>
  754.             </ul>
  755.           </xsl:when>
  756.           <xsl:when test="$locationtype='Stadsdeel'">
  757.             <h4>Buurt</h4>
  758.             <ul>
  759.               <xsl:if test="$stadsdeelNodeId != 0">
  760.                 <xsl:variable name="selectedStadsdeel" select="umbraco.library:GetXmlNodeById($stadsdeelNodeId)"/>
  761.                 <xsl:variable name="Buurten" select="$selectedStadsdeel/child::*[@isDoc and string(umbracoNaviHide) != '1']"/>
  762.  
  763.                 <xsl:for-each select="$Buurten">            
  764.                   <xsl:call-template name="BuurtFacet">
  765.                     <xsl:with-param name="facet" select="$city_part"/>
  766.                     <xsl:with-param name="data-filter" select="string('city_part')"/>
  767.                     <xsl:with-param name="value">
  768.                       <xsl:value-of select="string($stadsdeelNodeId)"/>_<xsl:value-of select="string(current()/@id)"/>
  769.                     </xsl:with-param>
  770.                     <xsl:with-param name="count">
  771.                       <xsl:call-template name="itemcount">
  772.                         <xsl:with-param name="parentNode" select="@id"/>
  773.                       </xsl:call-template>
  774.                     </xsl:with-param>
  775.                     <xsl:with-param name="text" select="current()/@nodeName"/>
  776.                     <xsl:with-param name="liClass" select="string('ui_openTree')"/>
  777.                   </xsl:call-template>
  778.                 </xsl:for-each>
  779.               </xsl:if>
  780.             </ul>
  781.           </xsl:when>
  782.           <xsl:when test="locationtype='Wijk'">
  783.            
  784.           </xsl:when>
  785.         </xsl:choose>
  786.       </section>
  787.         </xsl:if>
  788.        
  789.         <!--Vriendendienst wijziging-->
  790.       <xsl:if test="$subhome = 'Wonen' or $subhome = 'Vriendendienst'">
  791.       <section class="filter-section">
  792.         <h4>Soort</h4>
  793.         <ul>
  794.           <xsl:variable name="SoortWoning" select="umbraco.library:GetPreValues(1121)"/>
  795.  
  796.           <xsl:for-each select="$SoortWoning/preValue">
  797.             <xsl:call-template name="Facet">
  798.               <xsl:with-param name="facet" select="$objectsoort"/>
  799.               <xsl:with-param name="data-filter" select="string('Soort')"/>
  800.               <xsl:with-param name="value" select="current()/@id"/>
  801.               <xsl:with-param name="count" select="count($objecten[contains(objectSort, current()/@id)])"/>
  802.               <xsl:with-param name="text" select="."/>
  803.             </xsl:call-template>
  804.           </xsl:for-each>
  805.         </ul>
  806.       </section>
  807.       <section class="filter-section">
  808.         <h4>Type</h4>
  809.         <ul>
  810.           <xsl:variable name="TypeWoning" select="umbraco.library:GetPreValues(1111)"/>
  811.          
  812.           <xsl:for-each select="$TypeWoning/preValue">
  813.             <xsl:call-template name="Facet">
  814.               <xsl:with-param name="facet" select="$objectTypeConstruction"/>
  815.               <xsl:with-param name="data-filter" select="string('type')"/>
  816.               <xsl:with-param name="value" select="current()/@id"/>
  817.               <xsl:with-param name="count" select="count($objecten[contains(objectTypeConstruction, current()/@id)])"/>
  818.               <xsl:with-param name="text" select="."/>                          
  819.             </xsl:call-template>
  820.           </xsl:for-each>
  821.         </ul>
  822.       </section>
  823.       <section class="filter-section">
  824.         <h4>Aantal kamers</h4>
  825.         <ul>
  826.           <xsl:for-each select="umbraco.library:Split('1,2,3,4', ',')/value">
  827.             <xsl:variable  name="value" select="."/>
  828.  
  829.             <xsl:variable name="text">
  830.               <xsl:choose>
  831.                 <xsl:when test="$value = 1"><xsl:value-of select="$value"/> kamer</xsl:when>
  832.                 <xsl:otherwise><xsl:value-of select="$value"/> kamers</xsl:otherwise>
  833.               </xsl:choose>
  834.             </xsl:variable>
  835.  
  836.             <xsl:call-template name="Facet">
  837.               <xsl:with-param name="facet" select="$aantalkamers"/>
  838.               <xsl:with-param name="data-filter" select="string('kamers')"/>
  839.               <xsl:with-param name="value" select="$value"/>
  840.               <xsl:with-param name="count" select="count($objecten[objectChambersFrom = number($value)])"/>
  841.               <xsl:with-param name="text">
  842.                 <xsl:value-of select="$text"/>
  843.               </xsl:with-param>
  844.             </xsl:call-template>
  845.           </xsl:for-each>
  846.  
  847.           <xsl:call-template name="Facet">
  848.             <xsl:with-param name="facet" select="$aantalkamers"/>
  849.             <xsl:with-param name="data-filter" select="string('kamers')"/>
  850.             <xsl:with-param name="value" select="5"/>
  851.             <xsl:with-param name="count" select="count($objecten[objectChambersFrom &gt;= 5])"/>
  852.             <xsl:with-param name="text">5 of meer kamers</xsl:with-param>
  853.           </xsl:call-template>
  854.         </ul>
  855.       </section>
  856.       <section class="filter-section">
  857.         <h4>Oppervlakte</h4>
  858.         <ul>
  859.           <xsl:call-template name="Facet">
  860.             <xsl:with-param name="facet" select="$oppervlakte"/>
  861.             <xsl:with-param name="data-filter" select="string('oppervlakte')"/>
  862.             <xsl:with-param name="value" select="0"/>
  863.             <xsl:with-param name="count" select="count($objecten[objectLivingSurfaceFrom &lt; 50])"/>
  864.             <xsl:with-param name="text">tot 50 m<xsl:value-of select="string('&lt;sup&gt;2&lt;/sup&gt;')"/></xsl:with-param>
  865.           </xsl:call-template>
  866.  
  867.           <xsl:for-each select="umbraco.library:Split('50,75,100,150,250', ',')/value">
  868.             <xsl:variable name="value" select="."/>
  869.  
  870.             <xsl:call-template name="Facet">
  871.               <xsl:with-param name="facet" select="$oppervlakte"/>
  872.               <xsl:with-param name="data-filter" select="string('oppervlakte')"/>
  873.               <xsl:with-param name="value" select="$value"/>
  874.               <xsl:with-param name="count" select="count($objecten[objectLivingSurfaceFrom &gt; number($value)])"/>
  875.               <xsl:with-param name="text">+<xsl:value-of select="$value"/> m<xsl:value-of select="string('&lt;sup&gt;2&lt;/sup&gt;')"/></xsl:with-param>
  876.             </xsl:call-template>
  877.           </xsl:for-each>
  878.         </ul>
  879.       </section>
  880.       <section class="filter-section">
  881.         <h4>Aanwezigheid van</h4>
  882.         <xsl:call-template name="CheckboxFacet">
  883.           <xsl:with-param name="facet" select="$tuin"/>
  884.           <xsl:with-param name="name" select="string('Tuin')"/>          
  885.         </xsl:call-template>
  886.         <xsl:call-template name="CheckboxFacet">
  887.           <xsl:with-param name="facet" select="$balkon"/>
  888.           <xsl:with-param name="name" select="string('Balkon')"/>
  889.         </xsl:call-template>
  890.         <xsl:call-template name="CheckboxFacet">
  891.           <xsl:with-param name="facet" select="$berging"/>
  892.           <xsl:with-param name="name" select="string('Berging')"/>
  893.         </xsl:call-template>
  894.         <xsl:call-template name="CheckboxFacet">
  895.           <xsl:with-param name="facet" select="$garage"/>
  896.           <xsl:with-param name="name" select="string('Garage')"/>
  897.         </xsl:call-template>
  898.       </section>
  899.       </xsl:if>
  900.      
  901.       <xsl:if test="$subhome = 'Ondernemen'">
  902.         <section class="filter-section">
  903.           <h4>Oppervlakte vanaf</h4>
  904.           <ul>
  905.             <xsl:call-template name="Facet">
  906.               <xsl:with-param name="facet" select="$oppervlakte"/>
  907.               <xsl:with-param name="data-filter" select="string('oppervlakte')"/>
  908.               <xsl:with-param name="value" select="0"/>
  909.               <xsl:with-param name="count" select="count($objecten[objectLivingSurfaceFrom &lt; 25])"/>
  910.               <xsl:with-param name="text">&lt; 25 m<xsl:value-of select="string('&lt;sup&gt;2&lt;/sup&gt;')"/></xsl:with-param>
  911.             </xsl:call-template>
  912.            
  913.             <xsl:for-each select="umbraco.library:Split('25,75,100,125,175,200,300,500', ',')/value">
  914.               <xsl:variable  name="value" select="."/>
  915.  
  916.               <xsl:call-template name="Facet">
  917.                 <xsl:with-param name="facet" select="$oppervlakte"/>
  918.                 <xsl:with-param name="data-filter" select="string('oppervlakte')"/>
  919.                 <xsl:with-param name="value" select="$value"/>
  920.                 <xsl:with-param name="count" select="count($objecten[objectLivingSurfaceFrom &gt; number($value)])"/>
  921.                 <xsl:with-param name="text">&gt; <xsl:value-of select="$value"/> m<xsl:value-of select="string('&lt;sup&gt;2&lt;/sup&gt;')"/></xsl:with-param>
  922.               </xsl:call-template>
  923.             </xsl:for-each>
  924.           </ul>
  925.         </section>
  926.       </xsl:if>
  927.       <xsl:if test="$subhome = 'Parkeren'">
  928.         <section class="filter-section">
  929.           <h4>Type</h4>
  930.           <ul>
  931.             <xsl:variable name="TypeParkeerPlaats" select="umbraco.library:GetPreValues(6702)"/>
  932.  
  933.             <xsl:for-each select="$TypeParkeerPlaats/preValue">
  934.               <xsl:call-template name="Facet">
  935.                 <xsl:with-param name="facet" select="$parkeertype"/>
  936.                 <xsl:with-param name="data-filter" select="string('parkeertype')"/>
  937.                 <xsl:with-param name="value" select="current()/@id"/>
  938.                 <xsl:with-param name="count" select="count($objecten[contains(typeStorage, current()/@id)])"/>
  939.                 <xsl:with-param name="text" select="."/>
  940.               </xsl:call-template>
  941.             </xsl:for-each>
  942.           </ul>
  943.         </section>
  944.       </xsl:if>
  945.     </form>
  946.   </xsl:template>
  947.  
  948.   <xsl:template name="Facet">
  949.     <xsl:param name="facet"/>
  950.     <xsl:param name="data-filter"/>
  951.     <xsl:param name="value"/>
  952.     <xsl:param name="text"/>
  953.     <xsl:param name="count"/>
  954.  
  955.     <li>
  956.       <xsl:if test="$facet = number($value)">
  957.         <xsl:attribute name="class">selected-filter</xsl:attribute>
  958.         <span class="removeFilter">x</span>
  959.         <input type="hidden" name="{$data-filter}" value="{$value}"/>
  960.       </xsl:if>
  961.  
  962.       <xsl:variable name="selected">
  963.         <xsl:if test="$facet = number($value)">selected</xsl:if>
  964.       </xsl:variable>
  965.  
  966.       <a href="javascript:void(0);" data-filter="{$data-filter}" data-filter-value="{$value}" data-filter-amount="{$count}" class="ui_selectFilter {$selected}">
  967.         <xsl:value-of select="$text" disable-output-escaping="yes"/>
  968.       </a>&nbsp;
  969.       <span>
  970.         (<xsl:value-of select="$count"/>)
  971.       </span>
  972.     </li>
  973.   </xsl:template>
  974.  
  975.   <xsl:template name="CheckboxFacet">
  976.     <xsl:param name="facet"/>
  977.     <xsl:param name="name"/>
  978.    
  979.     <section class="form-element filter-selector">
  980.       <label for="{$name}">
  981.         <input type="checkbox" id="{$name}" name="{$name}" class="checkbox ui_selectFilter {{modus: 'checkbox'}}">
  982.           <xsl:if test="$facet = 'on'">
  983.             <xsl:attribute name="checked">checked</xsl:attribute>
  984.           </xsl:if>
  985.         </input>
  986.         <xsl:value-of select="$name"/>
  987.       </label>
  988.     </section>
  989.   </xsl:template>
  990.  
  991.   <xsl:template name="BuurtFacet">
  992.     <xsl:param name="facet"/>
  993.     <xsl:param name="data-filter"/>
  994.     <xsl:param name="value"/>
  995.     <xsl:param name="text"/>
  996.     <xsl:param name="count"/>
  997.     <xsl:param name="liClass"/>
  998.  
  999.     <li class="{$liClass}">
  1000.       <xsl:if test="contains(string($facet),string($value))">
  1001.         <xsl:attribute name="class">
  1002.           <xsl:value-of select="$liClass"/><xsl:text> tree-opened</xsl:text>
  1003.         </xsl:attribute>
  1004.         <span class="removeFilter">x</span>
  1005.         <input type="hidden" name="{$data-filter}" value="{$value}"/>
  1006.       </xsl:if>
  1007.  
  1008.       <xsl:variable name="selected">
  1009.         <xsl:if test="contains(string($facet),string($value))">selected</xsl:if>
  1010.       </xsl:variable>
  1011.  
  1012.       <a href="javascript:void(0);" data-filter="{$data-filter}" data-filter-value="{$value}" data-filter-amount="{$count}" class="ui_selectFilter {$selected}">
  1013.         <xsl:value-of select="$text"/>
  1014.       </a>&nbsp;
  1015.       <span>
  1016.         (<xsl:value-of select="$count"/>)
  1017.       </span>      
  1018.     </li>
  1019.   </xsl:template>
  1020.  
  1021.  
  1022.   <xsl:template name="googlemapobjects">
  1023.     <xsl:param name="objecten" />
  1024.     mapobjects
  1025.   </xsl:template>
  1026.  
  1027.   <xsl:template name="blockfilterpanel">
  1028.     <xsl:variable name="aanbodnode" select="umbraco.library:GetXmlNodeById(1268)"/>
  1029.     <div id="city-part-popup" class="clearfix"></div>
  1030.   </xsl:template>
  1031.  
  1032.   <xsl:template name="randombanner">
  1033.     <xsl:param name="output" />
  1034.     <xsl:param name="subhome_category" />
  1035.    
  1036.     <xsl:variable name="banner_category">
  1037.       <xsl:choose>
  1038.         <xsl:when test="$huuron ='' and (contains(umbraco.library:RequestQueryString('subhome'),'Wonen') or contains(umbraco.library:RequestQueryString('subhome_json'),'Wonen')) or contains(umbraco.library:RequestQueryString('action'),'Woningen')">SearchAgents</xsl:when>
  1039.         <xsl:otherwise><xsl:value-of select="$subhome_category"/></xsl:otherwise>
  1040.       </xsl:choose>
  1041.     </xsl:variable>
  1042.  
  1043.     <xsl:variable name="both_banners">
  1044.       <xsl:choose>
  1045.         <xsl:when test="$koopon !='' and $huuron!=''">SearchAgents</xsl:when>
  1046.         <xsl:when test="$koopon !=''">SearchAgents</xsl:when>
  1047.         <xsl:otherwise>
  1048.           <xsl:value-of select="$subhome_category"/>
  1049.         </xsl:otherwise>
  1050.       </xsl:choose>
  1051.     </xsl:variable>
  1052.  
  1053.  
  1054.  
  1055.     <xsl:variable name="visualsearchbanners" select="//descendant-or-self::*/VisualSearch [umbraco.library:GetPreValueAsString(objectSearchCategory) = $banner_category or umbraco.library:GetPreValueAsString(objectSearchCategory) = $both_banners]" />
  1056.     <xsl:variable name="randomNumber" select="floor(Exslt.ExsltMath:random() * count($visualsearchbanners)) + 1"/>
  1057.    
  1058.     <xsl:for-each select="$visualsearchbanners[position() = $randomNumber]">
  1059.       <xsl:variable name="visualTitle" select="./visualTitle"/>
  1060.       <xsl:variable name="visualIntroduction" select="./visualIntroduction"/>
  1061.       <xsl:variable name="visualPhoto" select="./visualPhoto"/>
  1062.       <xsl:variable name="visualLink" select="./visualLink"/>
  1063.  
  1064.       <xsl:choose>
  1065.         <xsl:when test="$output='json'">
  1066.           {
  1067.           "visualTitle": "<xsl:value-of select="$visualTitle"/>",
  1068.           "visualIntroduction": "<xsl:value-of select="umbraco.library:Replace($visualIntroduction, '&#xA;', '\n')" disable-output-escaping="yes"/>",
  1069.           "visualPhoto": "<xsl:if test="$visualPhoto != ''">/umbraco/ImageGen.ashx?image=<xsl:value-of select="umbraco.library:GetMedia($visualPhoto, 'false')/umbracoFile"/></xsl:if>",
  1070.           "visualLinkUrl": "<xsl:for-each select="./visualLink/links/link">
  1071.             <xsl:choose>
  1072.               <xsl:when test="./@type = 'external'">
  1073.                 <xsl:value-of select="./@link"/>
  1074.               </xsl:when>
  1075.               <xsl:otherwise>
  1076.                 <xsl:value-of select="umbraco.library:NiceUrl(./@link)"/>
  1077.               </xsl:otherwise>
  1078.             </xsl:choose>
  1079.           </xsl:for-each>",
  1080.           "visualLink": "1"
  1081.           <xsl:if test="$banner_category = 'SearchAgents'">
  1082.             ,
  1083.             "zoekprofiel": "1",
  1084.             "ingelogt" : "<xsl:value-of select="umbraco.library:Session('email') != ''"/>"
  1085.           </xsl:if>
  1086.           }
  1087.         </xsl:when>
  1088.         <xsl:otherwise>
  1089.           <li class="object-listitem-search search-banner clearfix">
  1090.             <xsl:if test="$visualPhoto != ''">
  1091.               <img width="100" height="80">
  1092.                 <xsl:attribute name="src">
  1093.                   <xsl:text>/umbraco/ImageGen.ashx?image=</xsl:text>
  1094.                   <xsl:value-of select="umbraco.library:GetMedia($visualPhoto, 'false')/umbracoFile"/>
  1095.                   <xsl:text>&amp;class=ObjectOverviewTumbnail</xsl:text>
  1096.                 </xsl:attribute>
  1097.                 <xsl:attribute name="alt">
  1098.                   <xsl:value-of select="@nodeName"/>
  1099.                 </xsl:attribute>
  1100.               </img>
  1101.  
  1102.             </xsl:if>
  1103.             <h3>
  1104.               <xsl:for-each select="./visualLink/links/link">
  1105.                 <a>
  1106.                      
  1107.                   <xsl:if test="./@newwindow = '1'">
  1108.                     <xsl:attribute name="target">_blank</xsl:attribute>
  1109.                   </xsl:if>
  1110.                   <xsl:choose>
  1111.                     <xsl:when test="./@type = 'external'">
  1112.                       <xsl:attribute name="href">
  1113.                         <xsl:value-of select="./@link"/>
  1114.                       </xsl:attribute>
  1115.                     </xsl:when>
  1116.                     <xsl:otherwise>
  1117.                       <xsl:attribute name="href">
  1118.                         <xsl:value-of select="umbraco.library:NiceUrl(./@link)"/>
  1119.                       </xsl:attribute>
  1120.                     </xsl:otherwise>
  1121.                   </xsl:choose>
  1122.                   <xsl:value-of select="./@title"/>
  1123.                 </a>
  1124.               </xsl:for-each>
  1125.             </h3>
  1126.  
  1127.             <p>
  1128.               <xsl:value-of select="$visualIntroduction"/>
  1129.             </p>
  1130.  
  1131.             <xsl:if test="$banner_category = 'SearchAgents'">
  1132.               <p>
  1133.                 <xsl:value-of select="./visualTitle"/>
  1134.               </p>
  1135.               <xsl:if test="umbraco.library:Session('email') = ''">
  1136.                 <p>
  1137.                   <a class="ui_formBox" href="#zoekprofielbox_form" id="zoekprofielbox">Zoekprofiel aanmaken of wijzigen </a>
  1138.                 </p>
  1139.               </xsl:if>
  1140.             </xsl:if>
  1141.  
  1142.           </li>
  1143.         </xsl:otherwise>
  1144.       </xsl:choose>
  1145.     </xsl:for-each>
  1146.   </xsl:template>
  1147.  
  1148.   <xsl:template name="itemcount">
  1149.     <xsl:param name="parentNode"/>
  1150.       <!--Vriendendienst wijziging-->
  1151.     <xsl:value-of select="count(umbraco.library:GetXmlNodeById($parentNode)/descendant::*
  1152.                    [
  1153.                    ((name()='Huurwoning' and $huuron!='' and ($subhome_category='Wonen' or $subhome_category = 'Vriendendienst')) or (name()='Koopwoning' and $koopon!='' and ($subhome_category='Wonen' or $subhome_category = 'Vriendendienst')))
  1154.                    or
  1155.                    ((name()='Huurbedrijfsruimte' and $huuron!='' and $subhome_category='Ondernemen') or (name()='Koopbedrijfsruimte' and $koopon!='' and $subhome_category='Ondernemen'))
  1156.                    or
  1157.                    ((name()='Huurparkeerplaats'  and $huuron!='' and $subhome_category='Parkeren') or (name()='Koopparkeerplaats' and $koopon!='' and $subhome_category='Parkeren'))
  1158.                  ]
  1159.                  [
  1160.                    (starts-with(name(),'Koop')
  1161.                    and
  1162.                    ((objectPriceFrom &gt; $koopprijsvan and $koopprijsvan !='') or ($koopprijsvan =''))
  1163.                    and
  1164.                    ((objectPriceFrom &lt; $koopprijstot and $koopprijstot !='') or ($koopprijstot =''))
  1165.                    )
  1166.                    or
  1167.                    (starts-with(name(),'Huur')
  1168.                    and
  1169.                    ((objectNetRent &gt; $huurprijsvan and $huurprijsvan !='')  or ($huurprijsvan =''))
  1170.                    and
  1171.                    ((objectNetRent &lt; $huurprijstot and $huurprijstot !='')  or ($huurprijstot =''))
  1172.                    )
  1173.                  ]
  1174.                  [
  1175.                  (objectGarden!='' and $tuin !='') or ($tuin ='')
  1176.                  ]
  1177.                  [
  1178.                  (objectBalcony !='' and $balkon !='') or ($balkon ='')
  1179.                  ]
  1180.                  [
  1181.                  (objectStorage!='' and $berging !='') or ($berging ='')
  1182.                  ]
  1183.                  [
  1184.                  (objectGarage != '' and objectGarage != '118') or ($garage ='')
  1185.                  
  1186.                  ]
  1187.                  [
  1188.                  ((objectChambersFrom=$aantalkamers or ($aantalkamers=5 and objectChambersFrom &gt; $aantalkamers))  and $aantalkamers !='') or ($aantalkamers ='')
  1189.                  ]
  1190.                  [
  1191.                  (((objectLivingSurfaceFrom &lt;=50 and $oppervlakte=0) or (objectLivingSurfaceFrom &gt;=$oppervlakte and $oppervlakte!=0))  or $oppervlakte='')
  1192.                  ]
  1193.                  [
  1194.                  (contains(objectTypeConstruction,$objectTypeConstruction) and $objectTypeConstruction !='') or ($objectTypeConstruction ='')
  1195.                  ]
  1196.                  [
  1197.                  (contains(objectSort,$objectsoort)  and $objectsoort !='') or ($objectsoort ='')
  1198.                  ]
  1199.                  [@isDoc and string(umbracoNaviHide) != '1']
  1200.                  )
  1201.                  "/>
  1202.   </xsl:template>
  1203.     <!--Vriendendienst wijziging-->
  1204.   <xsl:template name="breadcrumb">
  1205.     <xsl:if test="contains($currentPage/@nodeName,'Wonen' or 'Vriendendienst')">
  1206.       <xsl:choose>
  1207.         <xsl:when test="$koopon !='' and $huuron!=''">
  1208.           Een koop of -huurwoning in
  1209.         </xsl:when>
  1210.         <xsl:when test="$koopon ='' and $huuron!=''">
  1211.           Een huurwoning in
  1212.         </xsl:when>
  1213.         <xsl:when test="$koopon !='' and $huuron=''">
  1214.           Een koopwoning in
  1215.         </xsl:when>
  1216.       </xsl:choose>
  1217.     </xsl:if>
  1218.     <xsl:if test="contains($currentPage/@nodeName,'Ondernemen')">
  1219.       <xsl:choose>
  1220.         <xsl:when test="$koopon !='' and $huuron!=''">
  1221.           Een koop of -huurbedrijfsruimte in
  1222.         </xsl:when>
  1223.         <xsl:when test="$koopon ='' and $huuron!=''">
  1224.           Een huurbedrijfsruimte in
  1225.         </xsl:when>
  1226.         <xsl:when test="$koopon !='' and $huuron=''">
  1227.           Een koopbedrijfsruimte in
  1228.         </xsl:when>
  1229.       </xsl:choose>
  1230.     </xsl:if>
  1231.     <xsl:if test="contains($currentPage/@nodeName,'Parkeren')">
  1232.       <xsl:choose>
  1233.         <xsl:when test="$koopon !='' and $huuron!=''">
  1234.           Een koop of -huurparkeerplaats in
  1235.         </xsl:when>
  1236.         <xsl:when test="$koopon ='' and $huuron!=''">
  1237.           Een huurparkeerplaats in
  1238.         </xsl:when>
  1239.         <xsl:when test="$koopon !='' and $huuron=''">
  1240.           Een koopparkeerplaats in
  1241.         </xsl:when>
  1242.       </xsl:choose>
  1243.     </xsl:if>
  1244.     <xsl:choose>
  1245.       <xsl:when test="$locationtype='Stad'">
  1246.         <xsl:value-of select="$parent/@nodeName"/>
  1247.       </xsl:when>
  1248.       <xsl:when test="$locationtype='Stadsdeel'">
  1249.         <xsl:value-of select="$parent/parent::*/@nodeName" /> en de wijk
  1250.         <xsl:value-of select="$parent/@nodeName"/> &#187;
  1251.       </xsl:when>
  1252.     </xsl:choose>
  1253.   </xsl:template>
  1254.  
  1255.   <xsl:template name="json-facetcount">
  1256.     <xsl:param name="objecten" />
  1257.     <xsl:value-of select="umbraco.library:ChangeContentType('application/json')"/>
  1258.     <xsl:text>[{</xsl:text>
  1259.  
  1260.     <!--Find the city node based on the parent var-->
  1261.     <xsl:variable name="city" select="$parent/ancestor-or-self::*[@isDoc and string(umbracoNaviHide) != '1'][name()='Stad']" />
  1262.  
  1263.     <!--Loop trough the citypart nodes-->
  1264.     <xsl:for-each select="$city/child::*[@isDoc and string(umbracoNaviHide) != '1'][name()='Stadsdeel']">
  1265.       <xsl:variable name="stadsdeelId" select="current()/@id"/>
  1266.      
  1267.       <xsl:text>"</xsl:text>
  1268.       <xsl:if test="$locationtype = 'Stad'">
  1269.         <xsl:value-of select="$city/@id"/>
  1270.         <xsl:text>_</xsl:text>
  1271.       </xsl:if>
  1272.       <xsl:value-of select="@id" disable-output-escaping="yes"/>      
  1273.       <xsl:text>": "</xsl:text>
  1274.       <xsl:call-template name="itemcount">
  1275.         <xsl:with-param name="parentNode" select="@id"/>
  1276.       </xsl:call-template>
  1277.       <xsl:text>", </xsl:text>
  1278.  
  1279.       <!--Loop trough the neighbourhood nodes-->
  1280.       <xsl:for-each select="./child::*[@isDoc and string(umbracoNaviHide) != '1'][name()='Buurt']">
  1281.         <xsl:text>"</xsl:text>
  1282.         <xsl:if test="$locationtype = 'Stad'">
  1283.           <xsl:value-of select="$city/@id"/>
  1284.           <xsl:text>_</xsl:text>
  1285.         </xsl:if>
  1286.         <xsl:value-of select="$stadsdeelId"/><xsl:text>_</xsl:text><xsl:value-of select="@id" disable-output-escaping="yes"/>
  1287.         <xsl:text>": "</xsl:text>
  1288.         <xsl:call-template name="itemcount">
  1289.           <xsl:with-param name="parentNode" select="@id"/>
  1290.         </xsl:call-template>
  1291.         <xsl:text>", </xsl:text>
  1292.       </xsl:for-each>
  1293.  
  1294.     </xsl:for-each>
  1295.       <!--Vriendendienst wijziging-->
  1296.     <!--Wonen Subhome-->
  1297.     <xsl:if test="$subhome_json = 'Wonen' or $subhome_json = 'Vriendendienst'">
  1298.  
  1299.       <!--Soort-->
  1300.       <xsl:variable name="SoortWoning" select="umbraco.library:GetPreValues(1121)"/>
  1301.       <xsl:for-each select="$SoortWoning/preValue">
  1302.         <xsl:text>"</xsl:text>
  1303.         <xsl:value-of select="@id" disable-output-escaping="yes"/>
  1304.         <xsl:text>": "</xsl:text>
  1305.         <xsl:value-of select="count($objecten[contains(objectSort, current()/@id)])"/>
  1306.         <xsl:text>", </xsl:text>
  1307.       </xsl:for-each>
  1308.  
  1309.       <!--Type-->
  1310.       <xsl:variable name="TypeWoning" select="umbraco.library:GetPreValues(1111)"/>
  1311.       <xsl:for-each select="$TypeWoning/preValue">
  1312.         <xsl:text>"</xsl:text>
  1313.         <xsl:value-of select="@id" disable-output-escaping="yes"/>
  1314.         <xsl:text>": "</xsl:text>
  1315.         <xsl:value-of select="count($objecten[contains(objectTypeConstruction, current()/@id)])"/>
  1316.         <xsl:text>", </xsl:text>
  1317.       </xsl:for-each>
  1318.  
  1319.       <!--Aantal kamers-->
  1320.       <xsl:for-each select="umbraco.library:Split('1,2,3,4,5', ',')/value">
  1321.         <xsl:variable  name="spitted" select="."/>
  1322.         <xsl:choose>
  1323.           <xsl:when test="position()=last()">
  1324.             <xsl:text>"</xsl:text>
  1325.             <xsl:value-of select="$spitted" disable-output-escaping="yes"/>
  1326.             <xsl:text>": "</xsl:text>
  1327.             <xsl:value-of select="count($objecten[objectChambersFrom &gt;= number($spitted)])"/>
  1328.             <xsl:text>", </xsl:text>
  1329.           </xsl:when>
  1330.           <xsl:otherwise>
  1331.             <xsl:text>"</xsl:text>
  1332.             <xsl:value-of select="$spitted" disable-output-escaping="yes"/>
  1333.             <xsl:text>": "</xsl:text>
  1334.             <xsl:value-of select="count($objecten[objectChambersFrom=number($spitted)])"/>
  1335.             <xsl:text>", </xsl:text>
  1336.           </xsl:otherwise>
  1337.     </xsl:choose>
  1338.       </xsl:for-each>
  1339.  
  1340.       <!--Oppervlakte-->
  1341.  
  1342.       <xsl:text>"0": "</xsl:text>
  1343.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &lt;= 50])"/>
  1344.       <xsl:text>", </xsl:text>
  1345.  
  1346.       <xsl:text>"50": "</xsl:text>
  1347.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt; 50])"/>
  1348.       <xsl:text>", </xsl:text>
  1349.  
  1350.       <xsl:text>"75": "</xsl:text>
  1351.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt; 75])"/>
  1352.       <xsl:text>", </xsl:text>
  1353.  
  1354.       <xsl:text>"100": "</xsl:text>
  1355.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt; 100])"/>
  1356.       <xsl:text>", </xsl:text>
  1357.  
  1358.       <xsl:text>"150": "</xsl:text>
  1359.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt;= 150])"/>
  1360.       <xsl:text>", </xsl:text>
  1361.  
  1362.       <xsl:text>"250": "</xsl:text>
  1363.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt;= 250])"/>
  1364.       <xsl:text>"</xsl:text>
  1365.     </xsl:if>
  1366.  
  1367.     <!--Ondernemen-->
  1368.     <xsl:if test="$subhome_json = 'Ondernemen'">
  1369.  
  1370.       <!--Oppervlakte-->
  1371.  
  1372.       <xsl:text>"0": "</xsl:text>
  1373.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &lt;= 0])"/>
  1374.       <xsl:text>", </xsl:text>
  1375.  
  1376.       <xsl:text>"25": "</xsl:text>
  1377.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt; 25])"/>
  1378.       <xsl:text>", </xsl:text>
  1379.  
  1380.       <xsl:text>"75": "</xsl:text>
  1381.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt; 75])"/>
  1382.       <xsl:text>", </xsl:text>
  1383.  
  1384.       <xsl:text>"100": "</xsl:text>
  1385.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt; 100])"/>
  1386.       <xsl:text>", </xsl:text>
  1387.  
  1388.       <xsl:text>"125": "</xsl:text>
  1389.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt;= 125])"/>
  1390.       <xsl:text>", </xsl:text>
  1391.  
  1392.       <xsl:text>"150": "</xsl:text>
  1393.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt;= 150])"/>
  1394.       <xsl:text>", </xsl:text>
  1395.  
  1396.       <xsl:text>"175": "</xsl:text>
  1397.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt;= 175])"/>
  1398.       <xsl:text>", </xsl:text>
  1399.  
  1400.       <xsl:text>"200": "</xsl:text>
  1401.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt; 200])"/>
  1402.       <xsl:text>", </xsl:text>
  1403.  
  1404.       <xsl:text>"300": "</xsl:text>
  1405.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt; 300])"/>
  1406.       <xsl:text>", </xsl:text>
  1407.  
  1408.       <xsl:text>"500": "</xsl:text>
  1409.       <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt; 500])"/>
  1410.       <xsl:text>"</xsl:text>
  1411.  
  1412.       <!--Beschikbaarheid-->
  1413.       <!--
  1414.      <xsl:text>/* beschikbaarheid */ </xsl:text>
  1415.      <xsl:variable name="now" select="umbraco.library:CurrentDate()"/>
  1416.      -->
  1417.       <!--TODO: Create datediff-->
  1418.       <!--
  1419.      -->
  1420.       <!--Per direct-->
  1421.       <!--
  1422.      <xsl:value-of select="count($objecten[umbraco.library:DateDiff(objectDateAvailable, $now, 's') &lt; 0])"/>
  1423.      -->
  1424.       <!--Binnen 3 maanden-->
  1425.       <!--
  1426.      <xsl:value-of select="count($objecten[umbraco.library:DateDiff('2010-12-01', $now, 'm') &lt; 500])"/>
  1427.      -->
  1428.       <!--Binnen 6 maanden-->
  1429.       <!--
  1430.      <xsl:value-of select="count($objecten[umbraco.library:DateDiff('2010-12-01', $now, 'm') &lt; 500])"/>
  1431.      -->
  1432.       <!--Binnen 9 maanden-->
  1433.       <!--
  1434.      <xsl:value-of select="count($objecten[umbraco.library:DateDiff('2010-12-01', $now, 'm') &lt; 500])"/>-->
  1435.  
  1436.     </xsl:if>
  1437.  
  1438.  
  1439.     <!--Parkeren-->
  1440.     <xsl:if test="$subhome_json = 'Parkeren'">
  1441.  
  1442.       <!--Type-->
  1443.       <xsl:variable name="TypeParkeerPlaats" select="umbraco.library:GetPreValues(6702)"/>
  1444.       <xsl:for-each select="$TypeParkeerPlaats/preValue">
  1445.         <xsl:text>"</xsl:text>
  1446.         <xsl:value-of select="@id" disable-output-escaping="yes"/>
  1447.         <xsl:text>": "</xsl:text>
  1448.         <xsl:value-of select="count($objecten[contains(typeStorage, current()/@id)])"/>
  1449.         <xsl:text>"</xsl:text>
  1450.         <xsl:if test="position() &lt; count($TypeParkeerPlaats/preValue)">
  1451.           <xsl:text>, </xsl:text>
  1452.         </xsl:if>
  1453.       </xsl:for-each>
  1454.  
  1455.       <!--Oppervlakte-->
  1456.       <!--
  1457.      <xsl:text>/* oppervlakte */ </xsl:text>
  1458.  
  1459.      <xsl:text>'10', '</xsl:text>
  1460.      <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &lt;= 10])"/>
  1461.      <xsl:text>", </xsl:text>
  1462.  
  1463.      <xsl:text>'12', '</xsl:text>
  1464.      <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt;= 12])"/>
  1465.      <xsl:text>", </xsl:text>
  1466.      
  1467.      <xsl:text>'15', '</xsl:text>
  1468.      <xsl:value-of select="count($objecten[objectLivingSurfaceFrom &gt;= 15])"/>
  1469.      <xsl:text>", </xsl:text>-->
  1470.     </xsl:if>
  1471.  
  1472.     <xsl:text>}]</xsl:text>
  1473.   </xsl:template>
  1474.   <xsl:include href="ActieIconen.xslt"/>
  1475. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement