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

Inline loops #10

Closed
roboshoes opened this issue Aug 12, 2013 · 0 comments
Closed

Inline loops #10

roboshoes opened this issue Aug 12, 2013 · 0 comments

Comments

@roboshoes
Copy link
Owner

As discussed in #9 there are simples _foreach loops so far. However those loops require to use a external file. I find myself to run into situations where I want to loop over a set of values but only bake a single line for each value. It seems cumbersome to create a seperate file for that.

For example:

<ul>
    <!--(bake menu/line.html _foreach="value:menu.items")-->
</ul>

with the menu/line.html being:

<li>{{value}}</li>

There should be an inline version like so:

<ul>
    <!--(bake-inline menu/line.html _foreach="value:menu.items")-->
        <li>{{value}}</li>
    <!--(bake end)-->
</ul>

Not sure about the syntax. Any suggestions?

This issue was closed.
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

1 participant