The insert() function allows inserting a template into another one. You can pass variables as an optional second
argument.
<?php$this->insert('template_name',array('key'=>'value'));?>// Passes all variables of the current template
<?php $this->insert('template_name', $this->getData()); ?>
Example
We create an image_copyright.html5 template with the following content:
// image_copyright.html5
<small>Photographedby<?phpecho$this->name;?>, licensed as <?php echo $this->license; ?></small>
This template can now be reused at any place. Here, we’re for instance adding our copyright note
(image_copyright.html5) to the content block of the ce_image.html5 template: