Hi,
I'm trying to get variables to pick up in layouts. Is it not possible to set variables in layouts at the moment, or am I doing it wrong? Thanks
With the grunt assemble I was able to add front matter to a layout like this:
layout/index.hbs:
---
layout: default
test: blabla
---
title: {{test}} // Doesn't show anything
title: {{index.test}} // Doesn't show anything
{{debug}} // Variable not there
{% body %}
The var would be passed on to the default template.
With the new assemble, the layout declaration is picked up, but I'm not able to set variables. I tried this too:
assemble.layout('index', { content: '{{title}} {% body %}', layout: 'default', data: { "title": "Top Dark Menu" } } );
Hi,
I'm trying to get variables to pick up in layouts. Is it not possible to set variables in layouts at the moment, or am I doing it wrong? Thanks
With the grunt assemble I was able to add front matter to a layout like this:
layout/index.hbs:
The var would be passed on to the default template.
With the new assemble, the layout declaration is picked up, but I'm not able to set variables. I tried this too: