Skip to content

Instantly share code, notes, and snippets.

@pmeissner
Created September 11, 2012 16:23
Show Gist options
  • Save pmeissner/3699642 to your computer and use it in GitHub Desktop.
Save pmeissner/3699642 to your computer and use it in GitHub Desktop.
tag pairs variable helper count
{{ gallery }}
{{ if count < "6" }}
{{ img }} (1 through 5)
{{ else }}
{{ img }} (6 through infinity and beyond)
{{ endif }}
{{ /gallery }}
@pmeissner
Copy link
Author

When I use code, it applies same formatting to every variable based on the total count. I would expect it to say (1 through 5) to the first 5 images and (6 through infinity and beyond) to the the others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment