wvuweb / hammer

A tool for CleanSlate theme development
https://cleanslate.wvu.edu
4 stars 2 forks source link

Add support for pulling in multiple editable regions on a blog index page. #37

Closed adamjohnson closed 8 years ago

adamjohnson commented 8 years ago

Right now, we can call in content for your blog index page, like this:

blog:
  name: 25 Days of Giveaways
  articles:
    - article:
      name: <%= Faker::Lorem.sentence(1) %>
      title: <%= Faker::Lorem.sentence(1) %>
      created_by:
        first_name: <%= Faker::Name.first_name %>
      published_at: 2 days ago
      content: Yo Bro!

But, if you want to separate the content key to call multiple editable regions, it doesn't work at this moment. Code example:

blog:
  name: 25 Days of Giveaways
  articles:
    - article:
      name: <%= Faker::Lorem.sentence(1) %>
      title: <%= Faker::Lorem.sentence(1) %>
      created_by:
        first_name: <%= Faker::Name.first_name %>
        last_name: <%= Faker::Name.last_name %>
      published_at: 2 days ago
      content:
        article__short-desc: This is the short description editable region.
        article__long-desc: Long description editable region.

Here's a screenshot of the output:

blog-index-editable-regions

Using Hammer VM on OSX 10.10.5 (Yosemite).