Last active
August 29, 2015 14:08
-
-
Save flexbox/2b24e4bc917aa810df94 to your computer and use it in GitHub Desktop.
data each for yml file matrix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main: | |
- label: Femme | |
css_class: m-menu--item-main | |
submenu: | |
- entry: Modèle | |
categories: | |
- data: "Ballerines et babies" | |
- data: "Mules & sabots" | |
- data: "Sandales et nu-pieds" | |
- data: "Chaussons" | |
- entry: Marque | |
categories: | |
- data: "AirStep" | |
- data: "Chie Mihara" | |
- data: "Couleur pourpre" | |
- data: "Donna Piu" | |
- data: "Felmini" | |
- entry: Univers | |
categories: | |
- data: 'Bouts pointus' | |
- data: 'Chaussures à plateau' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- data.menu.main.each do |item| | |
- if item.label == 'Femme' | |
- if item['submenu'].present? | |
div class="m-submenu-complex m-menu--femme" | |
.row.collapse | |
- item['submenu'].each do |subitem| | |
.small-3.columns | |
p.l-title = subitem.entry | |
- if subitem['categories'].present? | |
ul | |
- subitem['categories'].each do |category| | |
li | |
= link_to category.data, '#' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment