canonical !== null): $canonicalLink = $seo_urls->canonical; break; /** * for products (esp those linked to multiple categories): */ case (strstr($current_page, '_info') && isset($_GET['products_id'])): $canonicalLink = zen_href_link($current_page, ($includeCPath ? 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id($_GET['products_id'])) . '&' : '') . 'products_id=' . $_GET['products_id'], $request_type, false); break; /** * for product listings: */ case ($current_page == 'index' && isset($_GET['cPath'])): $canonicalLink = zen_href_link($current_page, zen_get_all_get_params($excludeParams), $request_type, false); break; /** * for music products: */ case ($current_page == 'index' && isset($_GET['typefilter']) && $_GET['typefilter'] != '' && ( (isset($_GET['music_genre_id']) && $_GET['music_genre_id'] != '' ) || (isset($_GET['record_company_id']) && $_GET['record_company_id'] != '' ) ) ): unset($excludeParams[array_search('typefilter', $excludeParams)]); $canonicalLink = zen_href_link($current_page, zen_get_all_get_params($excludeParams), $request_type, false); break; /** * home page */ case ($this_is_home_page): $canonicalLink = preg_replace('/(index.php)(\?)(main_page=)(index)$/', '', zen_href_link(FILENAME_DEFAULT, '', $request_type, false)); break; /** * for new/special/featured listings: */ case (in_array($current_page, array('featured_products', 'specials', 'products_new'))): /** * for products_all: */ case ($current_page == 'products_all'): /** * for manufacturer listings: */ case ($current_page == 'index' && isset($_GET['manufacturers_id'])): /** * for ez-pages: */ case ($current_page == 'page' && isset($_GET['id'])): /** * all the above cases get treated here: */ $canonicalLink = zen_href_link($current_page, zen_get_all_get_params($excludeParams), $request_type, false); break; /** * All others * uncomment the $canonicalLink = ''; line if you want no special handling for other pages */ default: $canonicalLink = zen_href_link($current_page, zen_get_all_get_params($excludeParams), $request_type, false); //$canonicalLink = ''; } //$my_url = ($request_type == 'SSL' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; //if($canonicalLink == $my_url) $canonicalLink = ''; //unset($my_url); unset($excludeParams, $includeCPath);