0

I have an asset field type called organisation which points to another entry. That entry can be disabled for the current site, but I want to display it regardless. In Craft 2 the below code worked, but in Craft 3 it displays 0.

{{ currentUser.organisation.status('null').all()|length }}
  • Something is off using currentUser.organisation.enabledForSite(false).status(null) seems to give correct result, however the entry is enabled for the current site and I would expect it to work without enabledForSite(false) part. – Lukigi Jun 25 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.