Hi guys,
Got a wee issue that hopefully someone here can clear up.
I have a page with a field called features, the field type is page and it has pages that belong to it. I want to be able to query against that to return all the pages in a list that have one or more of those features ticked.
Here is my code at the moment. What I would have thought is it would be something like featured.subfield = 1.
$query = '';
if(isset($location) && $location != ''){
$query .= ",location=".$location;
}
if(isset($minPrice) && $minPrice != ''){
$query .= ",askingprice2>".$minPrice;
}
if(isset($bedrooms) && $bedrooms != ''){
$query .= ",number_of_bedrooms>=".$bedrooms;
}
if(isset($maxPrice) && $maxPrice != ''){
$query .= ",askingprice2<".$maxPrice;
}
$query .= ",start=".$start.",limit=".$limit;
//var_dump($query);
$saleproperties = $pages->get(1167)->children($query);
$pagination = $saleproperties->renderPager(array('listMarkup' => "<ul class='pagination'>{out}</ul>"));
echo $pagination;