Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Use page.find with list fields?

Started by Cath 8 years ago · 0 replies · 675 views
8 years ago

Is it possible to use page.find in a list output because having no joy?

This outputs as expected {{ page.find('/mypage').header.tagline }}

but I can't get it to work here...

<ul>
{% for list_page in page.header.list_page %}
{% set page = list_page.folder %} ---> where folder is the url /mypage
{% set ptag = page.find('page').header.tagline %}
<li>
<a href="{{ page }}">
{{ ptag }}
</a>
</li>
{% endfor %}
</ul>

Tried
{% set ptag = page.find('page').header.tagline %}
{% set ptag = page.find('{{ page }}').header.tagline %}

Suggested topics

Topic Participants Replies Views Activity
General · by jeremycherfas, 4 days ago
3 95 2 hours ago
General · by Old Man Umby, 2 days ago
1 60 2 days ago
General · by Sebastian, 4 days ago
1 81 4 days ago
General · by Andy Miller, 2 weeks ago
0 216 2 weeks ago
General · by ready-4-IT, 6 months ago
1 716 3 weeks ago