You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 8, 2024. It is now read-only.
Currently, each content_type is placed in an collection, but without any keys. Would it be possible to get the collection indexed by entry title, so that we can cherry pick a particular entry?
The text was updated successfully, but these errors were encountered:
Sadly, entry title is something one can't rely on as it's dependant on the Content Type structure.
But if you want to cherry-pick an entry you can do it like follows:
{%forentryinsite.data.contentful.spaces.my_space.entry%}
# By sys.id
{%ifentry.sys.id == 'MY_ENTRY_ID'%}
# Do something...
{%endif%}
# By a property
{%ifentry.title == 'some fancy title'%}
# Do something...
{%endif%}{%endfor%}
All entries provide a key for it's ID accessed with object.sys.id and you can easily filter by it, or you can filter by any property you want by directly accessing it.
I've found another workaround for this issue, as long as the data structure you have in contentful supports it. I've built a proof of concept (that's also sufficient for my use case), and if you think it's worth while I'll do some more work to put it behind a config option and add some error handling.
Currently, each content_type is placed in an collection, but without any keys. Would it be possible to get the collection indexed by entry title, so that we can cherry pick a particular entry?
The text was updated successfully, but these errors were encountered: