Skip to content

Instantly share code, notes, and snippets.

Last active December 21, 2015 17:38
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
koken lens variables issue
{{ _parent.album.context.position }}
{{ }} <!-- prints the number of albums in this set -->
Copy link

I'm dealing again with lens variables and having some problems.

This time i'm in the page within a Set, where 10 albums are displayed. I wanted to get for each album its numerical position in the list of all the albums of the set, and display this information like 1/10 for the first album, 2/10 for the second, and so on....

So I took {{ }} and {{ album.context.position }} and played a little while with them (i tried lot of things cuz i could not understand how to implement them from the documentation), but no result...
I'm making a custom theme, and this time i'm working on album_index_loop.html. How do the lens variables work?

Copy link

i was able at least to make the {{ }} work. Nonetheless {{ album.context.position }} does not print anything

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