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">');
Methods with the same name as their class will not be constructors in a future version of PHP; Markdown_Parser has a deprecated constructor #1 include_once() called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:499] #2 Docs_model->prepare_text( 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 fi...) called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:94] #3 Docs_model->show() called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.php:29] #4 Docs->init() called at [/var/www/diafan/data/www/diafancms.com/includes/init.php:474] #5 Init->module() called at [/var/www/diafan/data/www/diafancms.com/includes/init.php:119] #6 Init->start() called at [/var/www/diafan/data/www/diafancms.com/index.php:62] | /var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:499 |