Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example using nested loops #33

Closed
mammothcow opened this issue Aug 26, 2016 · 2 comments
Closed

Example using nested loops #33

mammothcow opened this issue Aug 26, 2016 · 2 comments

Comments

@mammothcow
Copy link

mammothcow commented Aug 26, 2016

I have been trying to understand how nested loops work. Not sure what sablon is looking for in the nested loop, i.e. the part of the "each" statement is not in the context passed in.

See below what I mean:

1 <widgets:each(anItem)>
2 <<anItem.details(foo)>>
3 <<=foo.description>>
4 <anItem.details:endEach>
5 <foo:endEach>

What I am seeing is that the inner loop is executing correctly but nothing shows up in the output document for what is expressed on line 3 above.

I am not sure if the syntax I am using is correct or what else I am doing incorrectly.

@senny
Copy link
Owner

senny commented Sep 3, 2016

@mammothcow could you upload a minimal sample template and the necessary sablon script to run it? This goes a long way to debug the issue.

@mammothcow
Copy link
Author

I've got the nested loops working. This was not a bug, a little more documentation around how to access things in the nested loops would be very helpful.

Other than that this works like a champ.

BTW... the way I thought it would work was correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants