getPageMeta()
The Twig-function {{ getPageMeta(settings,pageItem) }}
returns the metadata of a page as an array. The function can be used to list meta-information like meta-title and meta-description of pages inside a folder.
Example Usage
<ul>
{% for article in item.folderContent %}
{% set page = getPageMeta(settings, article) %}
<li>
<a href="{{ article.urlAbs }}">
<h2>{{ article.name }}</h2>
<small>{{ page.meta.modified }} | {{ page.meta.author }}</small>
<p>{{ page.meta.description }}</p>
</a>
</li>
{% endfor %}
</ul>
Parameter
- Param
settings
: The settings variable. - Param
pageItem
: Loop throughitem.folderContent
of the current item, if the current item is a folder. Alternatively you can get items from the navigation with getPageList. - Returns: The page meta as an array.