Answer the question
In order to leave comments, you need to log in
How to correctly pass json data (foundation panini)?
I'm using Gulp + Panini, and I'm trying to transfer data according to the scheme from the video .
The problem is that the .YML file transmits data correctly, but the .JSON file does not transmit data, more precisely, it transmits empty values. Below is an example to illustrate.
<div class="sidebar">
{{#repeat 2}}
{{#each navyml.item}}
<a href="{{root}}" class="sidebar__item">{{text}}</a>
{{/each}}
{{/repeat}}
{{#repeat 2}}
{{#each navjson.item}}
<a href="{{root}}" class="sidebar__item">{{text}}</a>
{{/each}}
{{/repeat}}
</div>
item:
-
text: item-yml
{
"item": {
"text": "item-json"
}
}
<div class="sidebar">
<a href="" class="sidebar__item">item-yml</a>
<a href="" class="sidebar__item">item-yml</a>
<a href="" class="sidebar__item"></a>
<a href="" class="sidebar__item"></a>
</div>
Answer the question
In order to leave comments, you need to log in
Strange, but that's how it works.
Deleted item here
<div class="sidebar">
{{#repeat 2}}
{{#each navjson}}
<a href="{{root}}" class="sidebar__item">{{text}}</a>
{{/each}}
{{/repeat}}
</div>
{
"navjson": {
"text": "item-json"
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question