On Nov 21, 2018, at 4:56 AM, Zahir Lalani <[email protected]> wrote:
>
> 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 return from a Dancer “template” call is HTML, so you can just use it
directly when rendering a sub-element. (Assuming the template is in fact
written in HTML.)
I cover this technique in my Perl Advent Calendar 2016 article series:
http://advent.perldancer.org/2016/3
http://advent.perldancer.org/2016/4
http://advent.perldancer.org/2016/5
http://advent.perldancer.org/2016/6
http://advent.perldancer.org/2016/7
This specific bit is in the middle article under "Factor Common UI Elements
Out”. It will help to read the whole series, since it’s describing a set of
concepts that hang logically together.
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users