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
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:
My _meta/_01-foot.mustache - which is loaded on every page - looks like this:
Then I've got a Page Pattern called02-index-scroll.mustache and a 02-index-scroll.json that looks like:
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:
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.
The text was updated successfully, but these errors were encountered:
It's not about including pattern but including conditional statements to load specific libraries on specific pages for example. But including patterns in these files would also be great.
I am using Pattern Lab Node
v1.2.3
onMac
, with Nodev4.4.7
, using theGulp
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:My
_meta/_01-foot.mustache
- which is loaded on every page - looks like this:Then I've got a Page Pattern called
02-index-scroll.mustache
and a02-index-scroll.json
that looks like: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:
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.
The text was updated successfully, but these errors were encountered: