Fork me on GitHub
#cryogen
<
2020-12-22
>
Andrei Stan15:12:53

hi, how can i display all of my articles? Right now i'm using:

{% for post in latest-posts %}
.....
It would be nice to have something like:
{% for post in posts %}
....
which did not worked so far.

Eugen18:12:52

It seems that posts are not available by default in a page template Can someone confirm this ?

Jakub Holý (HolyJak)21:12:40

params0 here https://github.com/cryogen-project/cryogen-core/blob/83d26343b296dc34815ef9f1e3ed20446bc95e9c/src/cryogen_core/compiler.clj#L629 is what your templates can see. You can provide a custom :extend-params-fn to extend it, see few lines bellow that and the docs about extending Cryogen for an example.