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 · 544 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 Hanns Mattes, 3 weeks ago
1 268 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 196 3 weeks ago
General · by Jerry Hunt, 3 weeks ago
2 331 3 weeks ago
General · by pamtbaau, 3 weeks ago
1 253 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 225 3 weeks ago