We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Hi All,

    Im using the following getPage call and the following filtering code ( by class ) which works well however it only filters on the getPage page that I am on, for example If I filter by Asia it will return 1 result on page 1 but 3 on page 2 so is there a way for me to filter across all the getPage pages ?

    getPage call:

    [[!getPage?
    		&parents=`7`
    		&depth=`100`
    		&tpl=`CollectionsItem2`
    		&tvFilters=`TeeTime==TeeTime`
    		&sortbyTV=`HotelRank`
    		&sortdirTV=`DESC`
    		&sortbyTVType=`integer`
    		&tvPrefix=``
    		&includeTVs=`1`
    		&processTV=`1`
    		&showHidden=`true`
    		&pageVarKey=`page`
    		&element=`getResources`
    		&elementClass=`modSnippet`
    		&limit=`10`
    		&pageNavOuterTpl=`[[+pages]]`
    		]]


    Filter call:

    <div id="top-recomendations" class="cube cube-content cube-dark">
    		<span>Refine your selection</span>
    		<p>Use our filter below to refine the list of hotels.</p>
    		<ul class="recomendations hf-filters">
    		  <li class="icon-family-friendly"><a href="#" data-filter=".Americas">Americas</a></li>
    		  <li class="icon-spatacular"><a href="#" data-filter=".ArabianGulf">Arabian Gulf</a></li>
    		  <li class="icon-todinefor"><a href="#" data-filter=".Asia">Asia</a></li>
    		  <li class="icon-teetime"><a href="#" data-filter=".Caribbean">Caribbean</a></li>
    		  <li class="icon-family-friendly"><a href="#" data-filter=".Europe">Europe</a></li>
    		  <li class="icon-spatacular"><a href="#" data-filter=".IndianOcean">Indian Ocean</a></li>
    		  <li class="icon-escape"><a href="#" data-filter=".EastAfrica">East Africa</a></li>
    		  <li class="icon-todinefor"><a href="#" data-filter=".NorthAfrica">North Africa</a></li>
    		  <li class="icon-teetime"><a href="#" data-filter=".SouthernAfrica">Southern Africa</a></li>
    		  <li class="clear-filter"><a href="#" data-filter="*">Clear/reset filter</a></li>
    		</ul>
    	  </div>


    Thanks
      • 4172
      • 5,888 Posts
      either you will need to pull all items server-side and filter everything at client-site
      or you need to filter only server-site, maybe some ajax-stuff could help, if you don't want page-reloads while filtering for different attributes.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 22840
        • 1,572 Posts
        Thanks for the reply Bruno, I think I'm going to go down the road of using getResources and handle the pagination using jQuery which I think will be the simplest solution.

        Thanks anyway