0){ if(count($basePath)==3){ $canonicalUrl = SITE_URL.'/'.$basePath[0].'/'.$basePath[1].'/'.$basePath[2]; } else if(count($basePath)==2){ $canonicalUrl = SITE_URL.'/'.$basePath[0].'/'.$basePath[1]; } else { $canonicalUrl = SITE_URL.'/'.$basePath[0]; } } else { $canonicalUrl = SITE_URL.'/'; } if (isset($_GET['router'])) { $php_file_location = $_GET['router']; } else { if(isset($basePath[1])){ if(($basePath[0]=='delhi-ncr' || $basePath[0]=='mumbai' || $basePath[0]=='chennai' || $basePath[0]=='bangalore') && $basePath[1]=='digital-marketing-company'){ $url_key = strtolower($basePath[0]); } else { if($basePath[0]=='delhi-ncr' || $basePath[0]=='mumbai' || $basePath[0]=='chennai' || $basePath[0]=='bangalore'){ $url_key = strtolower($url_key.'-'.$basePath[0]); } } } $data = $content->getKeyContont($url_key); if ($data) { $content_id = $data['id']; $meta_title = (!empty($data['meta_title'])) ? $data['meta_title'] : 'DigiSavers'; $meta_key = $data['meta_key']; $meta_desc = $data['meta_desc']; $header_image = $data['main']; if ($data['template'] == 'default') { $content_type = $data['content_type']; switch ($content_type) { case 'page': $php_file_location = 'page'; break; case 'post': $php_file_location = 'post'; break; case 'news_category': $php_file_location = 'category_post'; break; case 'photo_gallery': $php_file_location = 'gallery'; break; case 'clients': $php_file_location = 'clients'; break; default: $php_file_location = '404'; } } else { $php_file_location = (string) $data['template']; } } } $serviceParent = ''; //echo BASE_DIR.'/view/'.$php_file_location.'.php'; include BASE_DIR . '/view/' . $php_file_location . '.php';