You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm wondering if there is a way to nest layouts. I see in the express-hbsengine you can have something like the following:
layouts/site.hbs
<!DOCTYPE html>
<html>
<head>
<!-- common head things -->
</head>
<body>
{{{body}}}
</body>
</html>
layouts/with-header-footer.hbs
{{!<site}}{{!-- here's the magic --}}
<headerclass="site-header">...</header>
{{{body}}}
<footerclass="site-footer">...</footer>
In layouts/with-header-footer.hbs, the {{!< site }} means you get everything also wrapped in the site layout. This approach helps to DRY things up when your site uses multiple layouts. Is something like this currently available? Is there a better approach?
The text was updated successfully, but these errors were encountered:
Hello, I'm wondering if there is a way to nest layouts. I see in the
express-hbs
engine you can have something like the following:layouts/site.hbs
layouts/with-header-footer.hbs
In
layouts/with-header-footer.hbs
, the{{!< site }}
means you get everything also wrapped in thesite
layout. This approach helps to DRY things up when your site uses multiple layouts. Is something like this currently available? Is there a better approach?The text was updated successfully, but these errors were encountered: