title = "Proje Detay Uptade"
url = "/proje-uptade/:slug"
layout = "master"
is_hidden = 0
contentType = "html"
force_show = 0
==
param("slug");
$lang = LanguageController::GetLang();
$details = Db::table('flatart_contentmanager_')->where("status", 1)->where("lang", $lang)->where("category", "proje")->where("slug", $slug)->orderBy("id", "desc")->first();
if(!$details){
return $this->controller->run('404');
}
$this['details'] = $details;
$this->page->meta_title = $details->meta_title. " - Villa Yapı Prefabrik";
$this->page->meta_description = $details->meta_description;
$this['gallery'] = json_decode($details->gallery, true);
$this['project_detail'] = json_decode($details->project_detail, true);
$lastBlogs = Db::table('flatart_contentmanager_')->where("status", 1)->where("lang", $lang)->where("category", "proje")->orderBy("id", "DESC")->take(4)->get();
$this['lastBlogs'] = $lastBlogs;
$this['hreflang'] = Db::table('flatart_contentmanager_')->where("status", 1)->where("hreflang", $details->hreflang)->get();
foreach($this['hreflang'] as $item){
if($item->lang == 'tr'){
$this->page->turkishlink = "/tr/proje/".$item->slug."/";
}elseif($item->lang == 'en'){
$this->page->englishlink = "/en/project/".$item->slug."/";
}
}
if(!$this->page->turkishlink){
$this->page->turkishlink = "/tr/projeler/";
}
if(!$this->page->englishlink){
$this->page->englishlink = "/en/projects/";
}
if($lang == 'tr'){
$this->page->canonical = "https://villayapi.com/".$lang."/proje/".$details->slug."/";
}else{
$this->page->canonical = "https://villayapi.com/".$lang."/project/".$details->slug."/";
}
}
?>
==