Getting started
Sections
Help

Repeaters

From Snowfire Wiki

Jump to: navigation, search


Explanation and example

Repeaters is feature that enables you to create a block of HTML in a layout which can be repeated multiple times inside Live edit.

Consider the following example

<div>
	<h2>Apples</h2>
	<p>We got delicious Apples</we>
	<img src="apples.jpg" alt="Green apples" />
</div>
<div>
	<h2>Bananas</h2>
	<p>Be happy - eat a banana today</we>
	<img src="bananas.jpg" alt="Bananas" />
</div>

Every fruit above is using the same HTML. To create a layout for this content:

{ repeater(id:'1') }
<div>
	{ com_singlerow(id:'2', description:'Fruit', htmlElement:'h2') }
	{ com_wysiwyg(id:'3', description:'Description') }
	{ com_image(id:'3', description:'Image') }
</div>
{ repeater_end() }

Now it's up to the end user to create multiple fruits, rearrange and remove them.


Video tutorial (Swedish)

Views
Personal tools