On the home page of a site I am displaying a series of articles. In between each of these articles I wish to display a banner ad controlled via Low Variables.

At the moment it repeats the first ad between each channel entry instead of correctly looping through the banner ads.

Here is what I have so far:

{exp:channel:entries channel="articles" limit="14" disable="categories|category-fields|member-data"}

<h1><a href="{title_permalink='articles/view'}">{title}</a></h1>
<figure><a href="{title_permalink='articles/view'}">
{article_images cover_only="yes"}
<img src="{image:url:large}" alt="{image:title}" />
<p>Lorem Ipsum</p>
<a href="{title_permalink='articles/view'}">Further reading +</a>

{exp:low_variables:parse var="banner_ads" multiple="yes" limit="1"}
<div class="banner-ad">
<a href="{banner_ads_link}"><img src="{banner_ads_image_desktop}" /></a>


Any thoughts?

  • What's the Low Variables variable type? – Low Mar 26 '14 at 20:01
  • Matrix. It consists of 2 columns: an image and a link – Niall Thompson Mar 26 '14 at 20:24

You might be able to do this with the help of Math:

    offset="{exp:math formula='{count}-1'}"
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.