In template page_list get image attribute
Permalink
My following code is based on
1.Get current URL
2.Go through array and check if in url value = to value in array
do this:
So It will show me only pages that have the same attribute with URL
How can I pass also the Image Attribute??
1.Get current URL
2.Go through array and check if in url value = to value in array
do this:
$on_this_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; foreach ($city_array as $sandwich) { if (strpos($on_this_link, $sandwich) == true) { $sandwich = trim($sandwich, '/'); $city = $sandwich; if ($city == 'newyork') { foreach ($category_array as $double_sandwich) { if (strpos($on_this_link, $double_sandwich) == true) { $double_sandwich = trim($double_sandwich, '/'); $category_is = $double_sandwich; Loader::model('page_list'); $nh = Loader::helper('navigation'); $pl = new PageList(); $pl->filterByAttribute('city', '%' . $city . '%', 'like'); $pl->filterByAttribute('category','%'.$category_is.'%','like');
Viewing 15 lines of 24 lines. View entire code block.
So It will show me only pages that have the same attribute with URL
How can I pass also the Image Attribute??