public function onLoad($param) { $this->title = ''; $this->keywords = ''; $this->description = ''; $baseMethod = new BaseFunction(); $langID = $baseMethod->getShortLang(); $this->LangCode = $baseMethod->getShortLang(); switch ($this->getPage()->getPagePath()) { case 'Home': $seo = PagesRecord::finder()->findByID_AND_LangCode(1, $langID); $this->title = $seo->Name; $this->keywords = $seo->MetaKeywords; $this->description = $seo->MetaDescription; break; case 'Pages': $seo = PagesRecord::finder()->findByID_AND_LangCode($this->getRequest()->itemAt("id"), $langID); $this->title = $seo->Name; $this->keywords = $seo->MetaKeywords; $this->description = $seo->MetaDescription; break; default: break; } $phrase = SettingsRecord::finder()->findAllByLanguageID(1); foreach ($phrase as $key => $value) { $this->StaticPhrase[$value->Key] = $value->Value; } $this->Footer->DataSource = PagesRecord::finder()->findAll('ShowFooter = 1 ORDER BY Position '); $this->Footer->dataBind(); }