Skip to main content
Documentation/Dynamic Data/Loops/Alternate & Static Items
Dynamic Data

Alternate & Static Items

A loop repeats one Component for every item. Alternates and Static Items break
that rule at chosen positions — a featured card every third post, a call-to-action tile
halfway down the grid.

Both live in the Advanced popout inside Content → Repeated Block, and both work
identically on all three loop elements: Post Loop, Term Loop and
Repeater Field share the same code for deciding which Component a position gets.

The difference between them

This is the whole point of having two features, and it's easy to miss:

  • An Alternate replaces the design for an item. The item is still there, still gets
    its own data — it just renders through a different Component. Ten posts with an
    alternate on every third still produce ten cards.
  • A Static Item is an extra tile. It doesn't consume an item, so nothing is
    displaced: it's inserted into the sequence and the loop carries on where it left off.
    Ten posts with one static item produce eleven tiles, and all ten posts still appear.

Use an alternate when a post should look different. Use a static item when you want
something that isn't a post at all — an advert, a newsletter signup, a promo card.

Adding one

An alternate set to the Feature Card component, every third item
An alternate set to the Feature Card component, every third item

Open Advanced (the pencil beside the Advanced row in Repeated Block) and click Add
Item
under Alternates or Static Items. Each item has the same four controls:

  • Component — the Component to render at this position.
  • Position — which item in the sequence, counting from 1.
  • Repeat — off means "this position only"; on means "keep going".
  • Frequency — how many items apart the repeats are. Only appears once Repeat is on.

The screenshot above reads: from item 3, every 3rd item uses the Feature Card — so items
3, 6, 9, and so on.

With Repeat off, Position 3 alone means exactly one substitution, at item 3.

You can add several entries to either list. They're evaluated in order and the first one
that matches a position wins, so put your most specific rules first.

Which one wins

When a position could be claimed by more than one rule, Oxygen resolves it in a fixed
order:

  1. Static Items are checked first.
  2. Then Alternates.
  3. Otherwise the default Component from Repeated Block.

So a static item and an alternate that both target position 4 will produce the static
item.

Caution: a Frequency of 1 or less is ignored — Oxygen treats it as effectively
infinite so the rule fires once and never repeats. For static items this is a guard, not
a quirk: a static item every 1 position never consumes an item, so the loop would keep
inserting tiles forever and the request would hang. If a repeat isn't repeating, check
that Frequency is 2 or more.

Static items at the end

A static item positioned just past the last real item still renders. If a loop returns
six posts and you put a static item at position 7, you get the six posts followed by your
tile. This is the tidy way to close a grid with a "view all" card, and it works without
you knowing the result count in advance — but only for the position immediately after the
last item, not arbitrarily far past it.

A caveat about counting

Positions count rendered tiles, not posts. Because a static item occupies a position
without consuming a post, adding one shifts every position after it by one. If you have
an alternate on every third item and then insert a static item at position 4, the
alternate's rhythm relative to the posts changes. Set up static items first, then place
alternates against the sequence you can see in the canvas.