wvuweb / hammer

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

r:if and r:content_for cause duplicate output #82

Closed adamjohnson closed 5 years ago

adamjohnson commented 5 years ago

Steps to Reproduce

  1. Clone the diyoutdoors-v2 theme
  2. Start hammer, load the backpage of diyoutdoors-v2.
  3. Observe the lightbox / photo gallery working (click to open the lightbox, photos show properly).
  4. Now, open the _photo-gallery.html partial in your code editor and move lines 63-65 to be inside the closing r:if tag on line 61.

Results

Hammer outputs the content inside r:content_for twice in the DOM. This breaks the lightbox.

Script tags output twice in the DOM

Expected Results

Hammer should correctly output content inside of r:content_for when inside r:if tags.