[dancer-users] Injecting templates
Zahir Lalani
ZahirLalani at oliver.agency
Wed Nov 21 11:56:10 GMT 2018
Hi All
Need some guidance as to the options available
I currently have a module which renders a template as a whole page. I want to separate some stuff as its getting a little messy
This module is called by a parent controller. I want the parent controller to effectively call a master template render, and into that template I want to inject the content generated by the above sub module.
So to be clear:
Current:
Parent_controller
Call sub_module
Return template abc
New
Parent Controller
$Inject = sub_module ; (renders a tt)
Template xyz { parent_info = $x, inject_info = $inject }
The parent template would simply then have a variable where the $inject output is replaced
"template" is designed to render the whole page using layout - I am looking for something similar to the process template control of template toolkit.
Hope I made myself clear
Z
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20181121/081c53f8/attachment.html>
More information about the dancer-users
mailing list