Trying to use a front matter element in a liquid {% for %} loop #2028
-
|
I have the following front matter in an html file: In the body of the html, I have the following: The front matter reference {{ imageSet }} within the img tag works fine, but when I attempt to use it in the for loop, eleventy throws an error with the following: There is additional error info, noting the liquid js files that threw the error. When I simply replace the {{ imageSet }} in the for loop with the text itself, i.e., 'montecito' in this case, it works fine. Any thoughts would be welcome as I've got a lot of pages that will look like this and I'd like to make a shortcode out of this and pass in the front matter item. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
Try |
Beta Was this translation helpful? Give feedback.
Try
galleries[imageSet]syntax.