Discussion:
[hakyll] FOR-LOOP inside HTML
p***@gmail.com
2017-02-13 18:00:39 UTC
Permalink
I have a Variable $amount$, e.g. =5; I want to have a for-loop inside an
HTML document, so I draw an element 5-times.

How can I do this?
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jasper Van der Jeugt
2017-02-14 13:13:31 UTC
Permalink
We solved this over IRC. In the master branch, the
`Hakyll.Web.Paginate` module now exposes an additional `$allPages$`
field. This means you can do the following in a template:

$for(allPages)$
- Url: $url$
- Num: $num$
- Current: $if(isCurrent)$ true $else$ false $endif$
$endfor$

This will be included in the next release.

Jasper
Post by p***@gmail.com
I have a Variable $amount$, e.g. =5; I want to have a for-loop inside an
HTML document, so I draw an element 5-times.
How can I do this?
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...