Working to get head around middleman. Trying simple test case as follows, but having issues
menu.yml:
menuItems:
- menuItem:“Home”
menuLink:"/" - menuItem:“Concept”
menuLink:"/concept" - menuItem:“Design”
menuLink:"/design" - menuItem:“Delivery”
menuLink:"/delivery" - menuItem:“Gallery”
menuLink:"/gallery"
Then in layout.erb: (with best * though not working* guess for loop and then expected result example without data)
<ul class="top-nav">
<% data.menu.menuItems.each do |m| %>
<li><%= link_to m[:menuItem], m[:menuLink] %></li>
<% end %>
</ul>
<ul class="top-nav">
<li><%= link_to 'Home', '/' %></li>
<li><%= link_to 'Concept', '/concept/' %></li>
<li><%= link_to 'Design', '/design/' %></li>
<li><%= link_to 'Delivery', '/delivery/' %></li>
<li><%= link_to 'Gallery', '/gallery/' %></li>
</ul>
So, question is how do I get the data to pull through when I have key/value pairs in yaml file?
Can get the simple friends example without key & value to work.
Thanks.