Skip to content

Conditional Statement from meta/foot.mustache isn't loaded #410

Closed
@sergejreznik

Description

@sergejreznik

I am using Pattern Lab Node v1.2.3 on Mac, with Node v4.4.7, using the Gulp Edition.

I've got a problem with showing special content on a special page with a type of conditional statement.

For example:

My data.json looks like this:
bildschirmfoto 2016-07-28 um 10 21 03

My _meta/_01-foot.mustache - which is loaded on every page - looks like this:
bildschirmfoto 2016-07-28 um 10 19 52

Then I've got a Page Pattern called02-index-scroll.mustache and a 02-index-scroll.json that looks like:
bildschirmfoto 2016-07-28 um 10 19 58

In this demo case the <span class="test">foo 1</span> should be visible on one specific Page, where the json key is set to true.

My rendered DOM looks like this:
bildschirmfoto 2016-07-28 um 10 26 26

The span inside of the "if-statement" is not rendered on the page.

EDIT: I see, it's working if I create a new foot.mustache inside of the _patterns folder and include it to the page . But this way it's not dynamically anymore and the JS is loaded in a incorrect way. Or I have to load the JS-Files twice.

EDIT(2): the same conditional statements works inside the _meta/_00-head.mustache.
Tried to include a css-file only on the specific page. Works fine. So whats the problem with the _meta/_01-foot.mustache? In real I want to include specific JS.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions