S
Size: a a a
S
ОП
ST
S
ST
ST
ST
ST
S
А
NK
NK
ЭФ
ЭФ
my
ST
ST
public function onRun()
{
$category = Category::transWhere('slug', $this->property('slugCategory'))->first();
if (empty($category)) {
return $this->controller->run('404');
}
$this->page['category'] = $category;
$this->page->title = $category->title;
$this->page->seo_title = $category->seo_title;
$this->page->seo_description = $category->seo_description;
}
public function init()
{
Event::listen('translate.localePicker.translateParams', function($page, $params, $oldLocale, $newLocale) {
if ($page->baseFileName == 'category-page') {
return Category::translateParams($params, $oldLocale, $newLocale);
}
});
Event::listen('translate.localePicker.translateQuery', function($page, $params, $oldLocale, $newLocale) {
if ($page->baseFileName == 'category-page') {
return Category::translateParams($params, $oldLocale, $newLocale);
}
});
}
ST
ST