skeeks\cms\controllers\ContentElementController::_initStandartMetaData PHP Method

_initStandartMetaData() protected method

Установка метаданных страницы
protected _initStandartMetaData ( )
    protected function _initStandartMetaData()
    {
        $model = $this->model;
        if ($title = $model->meta_title) {
            $this->view->title = $title;
        } else {
            if (isset($model->name)) {
                $this->view->title = $model->name;
            }
        }
        if ($meta_keywords = $model->meta_keywords) {
            $this->view->registerMetaTag(["name" => 'keywords', "content" => $meta_keywords], 'keywords');
        }
        if ($meta_descripption = $model->meta_description) {
            $this->view->registerMetaTag(["name" => 'description', "content" => $meta_descripption], 'description');
        } else {
            if (isset($model->name)) {
                $this->view->registerMetaTag(["name" => 'description', "content" => $model->name], 'description');
            }
        }
        return $this;
    }