Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Use page.find with list fields?

Started by Cath 8 years ago · 0 replies · 778 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 lynbor, 1 month ago
5 541 5 days ago
General · by Andy Miller, 2 weeks ago
0 230 2 weeks ago
General · by lynbor, 4 weeks ago
7 658 3 weeks ago
General · by Harry, 3 weeks ago
0 235 3 weeks ago
General · by Old Man Umby, 1 month ago
2 368 1 month ago