a1684257
Administrator
first commit
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<?php
class SportPageController extends NodePageController
{
public function actionIndex()
{
/** @var $textSection TextPage */
$textPage = TextPage::model()->with('i18n')->findByPk($this->getNode()->data_id);
/** @var $textSection TextPage */
$textSection = TextPage::model()->with('i18n')->findByPk($this->getSectionNode()->data_id);
/** @var $sportRoot TextPage */
$sportRoot = SportRoot::model()->with('i18n')->findByPk($this->getRootNode()->data_id);
$this->pageName = $textPage->i18n->page_name;
$this->setSEOParams($textPage->i18n->title, $textPage->i18n->keywords, $textPage->i18n->description);
$this->setContacts(explode(',', $textPage->contacts_data));
$this->setContacts(explode(',', $textSection->contacts_data));
$this->setContacts(explode(',', $sportRoot->contacts_data));
if ($textSection->galleryBehavior->getGalleryPhotoCount() == 0)
$this->headerGalleryId = $sportRoot->header_gallery_id;
else
$this->headerGalleryId = $textSection->header_gallery_id;
$this->sectionGalleryId = $textPage->header_gallery_id;
$this->render('index', array(
'content' => $textPage->i18n->content,
));
}
}
|