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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Use page.find with list fields?

Started by Cath 7 years ago · 0 replies · 497 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 Jerry Hunt, 4 days ago
2 85 13 hours ago
General · by pamtbaau, 18 hours ago
1 60 17 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 350 5 days ago
General · by Duc , 6 days ago
3 44 5 days ago