I’m creating a custom featured posts block on the index.hbs
, something like:
{{#get 'posts' filter='featured:true' limit='all' as |featured|}}
{{#foreach featured}}
<a href='{{ url }}''>{{ title }}</a>
{{/foreach}}
{{/get}}
Then, to remove the duplicate featured posts from showing up in the current loop ({{#foreach posts}}
), I’m using filter: featured:false
within the collection.
collections:
/:
permalink: /{slug}/
template: index
filter: featured:false
Featured posts are now excluded from the index loop, but the problem is that the URL for the custom featured posts block is broken with generated value. Something like this:
/p/d1c7c28a-9083-418d-953b-6d5d2baec30d/
I’m not sure if this is an issue or something related to what @Hannah said:
Propaply, the custom featured posts are excluded and no longer part of a collection because of the featured:false
filter?
Any insights would be appreciated.
Ghost: 4.4.0