ruby on rails - print information to page using yml data file using Middleman / ERB -


given data file containing title, age, , description tag how go printing these out individually? i've tried using simple;

<% data.folder.to.file.example.title %> 

and blank should be, no error.

whereas using loop on list defined in same data file works fine;

<% data.folder.to.file.example.list.each |l| %>     <li>         <%= f %>     </li> <% end %> 

i guess put list, want know how better use these data files middleman setup. aim able create static pages via middleman's proxy generate pages end using data in yml files of same name. i'm halfway there think - taking looping example add [proxyname] after example , selects correct yml file.

help , pointers appreciated!

in example used <% data.folder.to.file.example.title %> evaluate expression not print out.

instead using <%= print out expression output file e.g. <%= data.folder.to.file.example.title %>


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -