Menu icon Foundation
Panini: Data (yml) Multidimensional Arrays

Hello

could it be realized that the yml for the dynamic data can be multidimensional.
My goal is to have a navigation.yml like:

- index.html
  - Startpage
- detail.html
  - Detail

So the main navigation can be "dynamic" with target for the anchors and a title for the Link.

Possible or something to implement?

paniniYAMLymldatadynamic

Hello

could it be realized that the yml for the dynamic data can be multidimensional.
My goal is to have a navigation.yml like:

- index.html
  - Startpage
- detail.html
  - Detail

So the main navigation can be "dynamic" with target for the anchors and a title for the Link.

Possible or something to implement?

Isaak Ordonez over 1 year ago

Hello,

 

I did with array of objects

- morePeople: {name: Ibai Acevedo, age: 21}
- morePeople: {name: Menno Adden, age: 22}
- morePeople: {name: Agence DPI, age: 21}
- morePeople: {name: Brunno Allard, age: 21}
- morePeople: {name: Taylor Allen, age: 21}
- morePeople: {name: Collection André Robé, age: 21}
- morePeople: {name: Murat aslan, age: 21}

 

On my template:

{{#each artists}}
  {{#each this}}
    <h2 class="artist-name">
	{{ this.name }}
     </h2> 
  {{/each}}
{{/each}}