Perfect Thx Warren
Z > -----Original Message----- > From: dancer-users <dancer-users-boun...@dancer.pm> On Behalf Of Warren > Young > Sent: 21 November 2018 18:32 > To: Perl Dancer users mailing list <dancer-users@dancer.pm> > Subject: Re: [dancer-users] Injecting templates > > On Nov 21, 2018, at 4:56 AM, Zahir Lalani <ZahirLalani@oliver.agency> 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 > dancer-users@dancer.pm > http://lists.preshweb.co.uk/mailman/listinfo/dancer-users _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users