public function action_set() { $mTemplates = M_Templates::Instance(); $this->messages = array(); $this->currentTemplate = $mTemplates->getCurrentTemplate(); if ($this->isPost()) { if (isset($_POST['templ'])) { if ($mTemplates->setTemplate($_POST)) { $this->redirect(M_Link::ToAdminTemplates('set')); } } elseif (isset($_POST['region'])) { unset($_POST['region']); $mTemplates->updateRegionsBlocks($_POST, $this->currentTemplate); } $this->messages = $mTemplates->errors(); } $this->listTemplates = $mTemplates->get_templates(); $this->regions = M_Regions::Instance()->getByTemplate($this->currentTemplate); $this->blocks = $mTemplates->regionsBlocks($this->currentTemplate); //var_dump($this->regions, $this->blocks); die(); // Получение пути к шаблону $templateName = $this->getTemplate('components/templates/v_set_template.php', $this); // Формирование контента страницы $this->content = $this->Template($templateName, $this); }
</li> <?php } ?> <?php if ($object->check_priv('C_Templates:action_set')) { ?> <li <?php if ($active == 'C_Templates') { echo 'class="active"'; } ?> > <a href="<?php echo M_Link::ToAdminTemplates('set'); ?> ">Оформление</a> </li> <?php } ?> <?php if ($object->check_priv('C_Gallery:action_index')) { ?> <li <?php if ($active == 'C_Gallery') { echo 'class="active"'; } ?>