We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

max_items for Replicator

Curtis Blackwell December 18, 2014 by Curtis Blackwell

So I've got a site I'm working on where the client needs to be able to add widgets of different varieties and reorder them. So Replicator. Problem is, some of the cards should only be able to appear once (stuff like Latest Blog Post).

I tried using template logic to do this and kept hitting the ceiling. Stuff like:

{{ var:some_set_first == "1" }}

{{ my_replicator }}
  {{ if type == "some_set" AND {var:some_set_first} }}
    {{ var:some_set_first == "0" }}

      {{# Code to show the set #}}

  {{ /if }}
{{ /my_replicator }}

But it seems like Statamic doesn't allow plugins to be used in conditionals within YAML array tag pairs.

>>>>>>> Unanswered <<<<<<<
2 Replies