wvuweb / hammer

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

Support tag page:data #29

Closed zeroedin closed 9 years ago

zeroedin commented 9 years ago

Custom data attributes can be set in the frontmatter of a layout:


---
layout: default

custom_data_attributes:
 - api_url

---

Then set in CleanSlates page properties.

That value can then be pulled back into the template using the page:data radius tag:

<r:page:data name='api_url' />

Need the ability to mock this in Hammer via the mock_data.yml

page:
  id: 2
  name: "Random Page"
  ...
  data:
    api_url: http://someurl-to.some-api.ontheweb.com