Muut
April 11, 2016, 8:38am
1
Hello
I’d like to built a price plan, i try that code with a nested loop, but it seems that i can’t loop inside items
. It’s ok with buttons
first level.
Any tips ?
-```
title: "Top C"
header: "Lorem ipsum"
subtitle: "Maecenas finibus nulla eu ornare"
visible: true
buttons:
-
description: 'Price Plan 1’
link: '#'
class: ''
price: '79 €’
items:
-
description: ‘desc1’
-
description: ‘desc2’
-
description: ‘desc3’
-
description: 'Price Plan 2’
link: '#'
class: ''
price: '99 €’
items:
-
description: ‘desc1’
-
description: ‘desc2’
-
description: ‘desc3’
----
Muut
April 11, 2016, 12:33pm
2
Your frontmatter (YAMLLint ) is invalid, should be:
title: "Top C"
header: "Lorem ipsum"
subtitle: "Maecenas finibus nulla eu ornare"
visible: true
buttons:
- description: 'Price Plan 1'
link: '#'
class: ''
price: '79 €'
items:
- description: 'desc1'
- description: 'desc2'
- description: 'desc3'
- description: 'Price Plan 2'
link: '#'
class: ''
price: '99 €'
items:
- description: 'desc1'
- description: 'desc2'
- description: 'desc3'
Muut
April 11, 2016, 12:38pm
3
thanks, i just find out by myself, i was about to post solution, i’m new to grav and bit confuse about indentation, only space (no tabs) etc.
I have to google about YAML
thanks again
Muut
April 11, 2016, 12:39pm
4
Yes, YAML is a bit fickly in that regard.