wvuweb / hammer

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

Add support for tag: page:data_exists #95

Open adamjohnson opened 4 years ago

adamjohnson commented 4 years ago

How to reproduce

  1. Start hammer: hammer-start
  2. Navigate to the backpage template in the design system: http://localhost:2000/wvu-design-system/views/backpage.html
  3. r:page:data_exists is used in the _wvu-component-footer.html and in the _wvu-check-if-saved.html partials.

Tag to add support for

page:data_exists:

A couple different ways to use it:

<h2><r:page:data_exists /></h2>

<h2><r:page:data_exists for="cool_custom_attribute" /></h2>

<r:set_var name="isSaved" default="{page:data_exists}" />

Link to tags in CleanSlate repo

cleanslate/app/lib/slate/radius/tags/page.rb (Github)