We changed our privacy policy. Read more.

New answers tagged

1

Update 2021-09-24 The actual issue is that entries fields can't hold references to drafts only, only to 'real' entries. Drafts have their own ID, but they aren't real entries. The entries field validates this, so any ID that doesn't belong to a realy entries is silently discarded. If the draft belongs to an entry that is already live, the solution is to add ...


1

Reasons is not built to be used on the frontend. But, if you really want to you can get all the Reasons raw data (emphasis on raw) in Twig like this: {% set reasonsData = craft.app.getPlugins().getPlugin('reasons').reasons.getData() %} The above would return an array containing the actual conditional rules, in addition to arrays of toggle fields and target ...


0

If you only need your custom fields, you can could use craft.app.fields.getLayoutTabsById() to grab the relevant tabs then do something like: {% set section = craft.app.sections.getSectionByHandle('handle') %} {% set fieldLayoutId = section.getEntryTypes[0].getFieldLayout().id %} {% set fieldLayoutTabs = craft.app.fields.getLayoutTabsById(fieldLayoutId) %} {...


Top 50 recent answers are included