All Collections
Co-Reg Tech
Working with Repeating Elements
Working with Repeating Elements
James Dodd avatar
Written by James Dodd
Updated over a week ago

PLEASE NOTE: This requires some HTML knowledge and a good understand of CoReg tech.

Your competition template supports the ability of a repeat tag, this tag allows you to loop through information for all your competitions and output it for users,

Example:

<repeat type="competition">
<img data-db-localized-src="COMPETITION_THUMBNAIL" />
<h2 data-db-localized-content="COMPETITION_NAME"></h2>
<a data-db-href="COMPETITION_URI">enter competition</a>
<span data-db-localized-content="COMPETITION_DESCRIPTION"></span>

Opens on <data name="COMPETITION_OPEN_ON" /><br />
Close on <data name="COMPETITION_CLOSE_ON">stuff</data><br />
Draw on <data name="COMPETITION_DRAW_ON" /><br />
</repeat>

AS you can see, this looks like normal HTML with the addition of a repeat tag and some data tags. But with those tags, the outputted code will render that for each competition.

Here's a breakdown of available options

An Image for the competition from COMPETITION_THUMBNAIL

The competition name from COMPETITION_NAME

A link to enter competition with the COMPETITION_URI

A description of the competition from COMPETITION_DESCRIPTION

And then details of when it opens, closes and when it will be drawn with

COMPETITION_OPEN_ON
COMPETITION_CLOSE_ON
COMPETITION_DRAW_ON

Did this answer your question?