Answer the question
In order to leave comments, you need to log in
How to output standard slideshow variables in header.twig (banner and its name)?
Good afternoon.
Please tell me the algorithm of actions: it is
necessary to display the image variables and the names of the standard slideshow.twig in the header.twig file
, there is no need to transfer the slider module itself, only variables so that the header contains slides and their names.
I suspect that in the header.php controller it is necessary to include models as in the slideshow.php controller:
$this->load->model('design/banner');
$this->load->model('tool/image');
$data['banners'] = array();
$results = $this->model_design_banner->getBanner($setting['banner_id']);
foreach ($results as $result) {
if (is_file(DIR_IMAGE . $result['image'])) {
$data['banners'][] = array(
'title' => $result['title'],
'link' => $result['link'],
'image' => $this->model_tool_image->resize($result['image'], $setting['width'], $setting['height'])
);
}
}
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