New answers tagged

1 vote

Get section handle of an entry inside of an EntryField

If the linkedEntry field is empty, then category.linkedPage.one() will evaluate to null, so you should always add a condition to check that a value exists before calling a method on it. {% set ...
user avatar
  • 6,316
0 votes

Get section handle of an entry inside of an EntryField

You haven't executed your element query: https://craftcms.com/docs/4.x/element-queries.html#executing-element-queries (If you attempted to do this in Craft 3 it would have given you a slapped wrist by ...
user avatar
  • 3,949
0 votes

How to get a list of entry types for a section using GraphQL?

You can query for elements (entries, users, etc.) using Craft's GraphQL API, but not for collections of elements (sections, user groups, etc.). My suggestion would be to either hard-code these, as I ...
user avatar
  • 6,316

Top 50 recent answers are included