This makes working with pages easier. For example, instead of this:
{% for article in search.pages("type=article", "date=desc") %}
<a href="{{ article.data.url }}">
<h1>{{ article.data.title }}</h1>
</a>
{% endfor %}
It would become to this:
{% for article in search.pages("type=article", "date=desc") %}
<a href="{{ article.url }}">
<h1>{{ article.title }}</h1>
</a>
{% endfor %}
If it's necesary to access to the Page instance (to get the src data, for example) it's available at data.page. Example:
{% for article in search.pages("type=article", "date=desc") %}
<a href="{{ article.url }}">
<h1>{{ article.title }}</h1>
Loaded from {{ article.page.src.path }}
</a>
{% endfor %}
Due this is a breaking change, it will be in Lume 2.0.
This makes working with pages easier. For example, instead of this:
It would become to this:
If it's necesary to access to the
Pageinstance (to get thesrcdata, for example) it's available atdata.page. Example:Due this is a breaking change, it will be in Lume 2.0.