How should I implement custom variables as described in the following excerpt from Page Collections in the Grav Documentation?
What is not clear to me is how to include a custom variable in a blog-item page, e.g. _showcase.
content:
order:
by: default
custom:
- _showcase
- _highlights
- _callout
- _features
limit: 5
pagination: true
In the above configuration, you can see that content.order.custom is defining a custom manual ordering to ensure the page is constructed with the showcase first, highlights section second etc. Please note that if a page is not specified in the custom ordering list, then Grav falls back on the content.order.by for the unspecified pages.
The collection comes from taxonomy values:
- { '@taxonomy.category': a }
- { '@taxonomy.category': b }
What I want to do is ‘showcase’ certain items at the top of the list.
Many thanks
Ian