
Last week I went over how to configure and include
templates. This
is a pretty standard procedural solution: My current template calls
another template. But what if I need to pass additional data to my
layout template? Perhaps in addition to the content in my template,
I also have some <meta>
or <script>
tags to include, or some
<style>
specific to this page. This would involve somehow passing data
"up", or making the data available for the layout template to use.
Mojolicious provides a way to do this: named
content
blocks.