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

Outer model condition within submodel loop not supported #5

Open
ImrePyhvel opened this issue Jul 2, 2015 · 1 comment
Open

Outer model condition within submodel loop not supported #5

ImrePyhvel opened this issue Jul 2, 2015 · 1 comment
Labels

Comments

@ImrePyhvel
Copy link
Collaborator

example pseudocode:

[[ for(Model.Items) ]]
[[ if(Model.Condition) ]] smth [[ endif(Model.Condition) ]]
[[ endfor(Model.Items) ]]

This causes parser to go to endless loop. It fails to determine the condition value from the submodel but it knows there are more replacements to make.

Emergency workaround is to brind such conditions outside the for-loop:

[[ if(condition) ]] 
  [[ for(Model.Items) ]]
    if-content here
  [[ endfor(Model.Items) ]]
[[ elseif(condition)]]
  [[ for(Model.Items) ]]
    elsecontent
  [[ endfor(Model.Items) ]]
[[ endif(condition) ]]
@ImrePyhvel ImrePyhvel added the bug label Jul 2, 2015
@ImrePyhvel
Copy link
Collaborator Author

Fixed in develop branch with major internal overhaul. Release version TBD.

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

No branches or pull requests

1 participant