I've used Template::Toolkit for my last few Catalyst projects and have a set up that I like using that allows a clean separation of my templates. Now I'm hoping to use Text::Xslate, but I'm having trouble figuring out if I can do my same setup or not. Below is what I have for Template::Toolkit usually.
__PACKAGE__->config({
...
WRAPPER => 'site/wrapper',
...
});
wrapper
[% content WRAPPER site/html + site/layout %]
html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>[% template.title or site.title %]</title>
<style type="text/css">
</style>
</head>
<body>
[% content %]
</body>
</html>
layout
<div id="header">[% PROCESS site/header %]</div>
<div id="content">
[% content %]
</div>
<div id="footer">[% PROCESS site/footer %]</div>`
And then header and footer have their own content. I like this solution because everything is cleanly separated and I'm not breaking up any div tags around the content by having to put the opening tag in header and the closing in the footer. It looks like with the TTerse syntax there is some wrapper functionality, but I'm not sure if that allows me to recreate what I normally do. I also found this answer that says you can use wrapper in theory, but doesn't really give any examples.