For future readers:
I'm not sure if this is the best way to do it, but it seems simple
enough. I've created a products.yml file that includes an array of
product hashes, like this:
:products:
-
name: Thing for sale 1
desc: "This is a product for sale"
image: thing1.png
-
name: Thing for sale 2
desc: "This is also a product for sale"
image: thing2.png
-
name: Thing for sale 3
desc: "This is a final product for sale"
image: thing3.png
Then I created an images subfolder, and put the png files in there.
The display loop looks like this:
{% for product in products %}
<div class="display {% cycle 'left', 'right' %}">
<h2 class="headline">{{
product.name}}</h2>
<img src="{{product.image | prepend:'images/'}}"
alt="{{
product.name}}" />
<div class="content">{{product.desc}}</div>
</div>
{% endfor %}
-- Duane
http://makerhome.ca/