Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Template Toolkit include

  • INCLUDE
---
template: "template_toolkit"
package App;
use Dancer2;

get '/' => sub {
    return template 'main.tt', {
        name => 'Perl Dancer',
    };
};

App->to_app;
[% INCLUDE 'incl/header.tt' %]

<h1>main.tt - [% name %]</h1>

[% INCLUDE 'incl/footer.tt' %]
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport"
     content="width=device-width, initial-scale=1, user-scalable=yes">
  <title>[%- name -%]</title>
</head>
<body>
From header.tt
<hr>
<hr>
Footer
</body>
</html>
  • Also include navigation etc.