in reply to Re^4: How do you use Template Toolkit with Dancer2?
in thread How do you use Template Toolkit with Dancer2?

Thank you for your answer. If a menu template can be included in a "parent" template, how would one go about including two or more menus in the "parent" template, where the difference is only the menu's name and the data-set. Wouldn't that introduce ambiguity to the assignment of variables within the menu template?
  • Comment on Re^5: How do you use Template Toolkit with Dancer2?

Replies are listed 'Best First'.
Re^6: How do you use Template Toolkit with Dancer2?
by choroba (Cardinal) on Apr 29, 2022 at 07:30 UTC
    That's why templates have their arguments, too. See INCLUDE:
    [% INCLUDE template var = val, ... %]

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]