Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

AleksTim

Newbie
  
  • Posts

    4
  • Joined

  • Last visited

1 Follower

AleksTim's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. Разобрался Дело было в этой строке: $this->response->setOutput($this->load->view('test/home', $data)); Забыл передать в неё массив $data ) Спасибо!
  2. Сделал так, не помогло, все равно на страницу не погрузился ни хедер ни футер (( В чем может быть причина? Может кроме контроллера еще где-то нужно что-то добавить? <?php class ControllerTestPage extends Controller { public function index() { $this->document->setTitle($this->config->get('config_meta_title')); $this->document->setDescription($this->config->get('config_meta_description')); $this->document->setKeywords($this->config->get('config_meta_keyword')); if (isset($this->request->get['route'])) { $canonical = $this->url->link('test/page'); if ($this->config->get('config_seo_pro') && !$this->config->get('config_seopro_addslash')) { $canonical = rtrim($canonical, '/'); } $this->document->addLink($canonical, 'canonical'); } $data['footer'] = $this->load->controller('common/footer'); $data['header'] = $this->load->controller('common/header'); $this->response->setOutput($this->load->view('test/page')); } }
  3. Попытался написать контроллер по аналогии с контроллером home.php папка контроллера: catalog\controller\test\page.php папка страницы: catalog\view\theme\default\template\test\page.twig <?php class ControllerTestPage extends Controller { public function index() { $this->document->setTitle($this->config->get('config_meta_title')); $this->document->setDescription($this->config->get('config_meta_description')); $this->document->setKeywords($this->config->get('config_meta_keyword')); if (isset($this->request->get['route'])) { $canonical = $this->url->link('test/page'); if ($this->config->get('config_seo_pro') && !$this->config->get('config_seopro_addslash')) { $canonical = rtrim($canonical, '/'); } $this->document->addLink($canonical, 'canonical'); } $this->response->setOutput($this->load->view('test/page')); } } на проблема в том что к странице не подтягивается {{ header }} из header.twig
  4. Доброго времени! Подскажите новичку как подключить страницу page.php в шаблон OpenCart 3.0. Есть шаблон ocStore 3.0 в нем есть главное меню, хочу чтобы ссылки из меню вели на статичные страницы, но при этом на эти статичные страницы подтягивались header и footer . Как это сделать? Если меняю формат страницы на .twig и указывать путь к нему, то естественно браузер не знает что такое twig и я получаю ошибку.
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.