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

loop over custom tag result #81

Open
Igor-Palaguta opened this issue Nov 15, 2020 · 2 comments
Open

loop over custom tag result #81

Igor-Palaguta opened this issue Nov 15, 2020 · 2 comments

Comments

@Igor-Palaguta
Copy link

In Leaf 3 we could loop not just over arrays from context, but we also could loop over custom tag result

Now in Leaf 4:

  1. #for(language in #config("app", "languages")):
    Throws exception:
    LeafKit.LexerError.Reason.invalidParameterToken(\"#\")

  2. #for(language in config("app", "languages")):
    Throws:
    "for loops expect single expression, 'name in names'"

@tonyarnold
Copy link
Contributor

tonyarnold commented Oct 3, 2021

I'm seeing the same issue with the Nodes Flash package. I was expecting to be able to use the following in my templates (where flashes() is the custom tag):

#for(flash in flashes().all):

#endfor

@ptoffy
Copy link
Member

ptoffy commented Apr 24, 2023

@0xTim here you go, for the flashes library 🫡

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

3 participants