Module templates – files in the folder modules/module_name/views. File name must be modules/module_name/views/module_name.view.template_name.php.
Typically, the composition of the following files:
The template may be other files that reflect the individual characteristics of the module.
Connecting the template of the controller is as follows:
Example:
echo $this->diafan->_tpl->get('template_name', 'module_name', $result);
where $result
– transmitted in template data as an array, derived from the model.
The template to call another template, you can use the short form:
Example:
echo $this->get('template_name', 'module_name', $result);
Example:
/* output template "Buy" button shop.view.buy_form
from product page template shop.view.id */
echo $this->get('buy_form', 'shop', array("row" => $result, "result" => $result));
The template can be displayed the template tag using function htmleditor.
Example:
// output dynamic block
// in the template modules/news/views/news.view.id.php
echo $this->htmleditor('<insert name="show_dynamic" module="site" id="1">');