Answer the question
In order to leave comments, you need to log in
Routing to a custom page?
Hello, please advise. I created my own custom page,
in the controller and in the view I made the files according to the instructions , but how to make the menu link automatically in the menu
<ul class="main-navigation">
...
<li><a href="{{ guarantee }}">{{ text_guarantee }}</a></li>
<li><a href="{{ contact }}">{{ text_contact }}</a></li>
</ul>
<?php
class ControllerInformationGuarantee extends Controller {
public function index() {
// Optional. This calls for your language file
$this->load->language('information/guarantee');
// Optional. Set the title of your web page
$this->document->setTitle($this->language->get('heading_title'));
// Breadcrumbs for the page
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home')
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('information/guarantee')
);
// Get "heading_title" from language file
$data['heading_title'] = $this->language->get('heading_title');
// All the necessary page elements
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');
// Load the template file and show output
$this->response->setOutput($this->load->view('information/guarantee', $data));
}
}
{{ header }}
<div id="information-information" class="container">
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
<div class="row">{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-6' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-9' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">{{ content_top }}
<h1>{{ heading_title }}</h1>
rwerwrewer
{{ content_bottom }}</div>
{{ column_right }}</div>
</div>
{{ footer }}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question