$field->pages()
Converts a yaml list of page URIs to valid page objects
-
return ($pages)
Example
Text file
title: My page
----
text: Some text
----
related:
- blog/article-a
- blog/article-b
Template
<h2>Related articles</h2>
<ul>
<?php foreach($page->related()->pages() as $related): ?>
<li>
<a href="<?= $related->url() ?>">
<?= $related->title()->html() ?>
</a>
</li>
<?php endforeach ?>
</ul>