Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Use page.find with list fields?

Started by Cath 7 years ago · 0 replies · 584 views
7 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 Andy Miller, 2 days ago
0 72 2 days ago
General · by Veehem, 3 days ago
0 111 3 days ago
General · by milkboy, 4 days ago
0 113 4 days ago
General · by ian russell, 2 weeks ago
2 205 1 week ago
General · by pamtbaau, 1 month ago
2 462 2 weeks ago