Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Querying entries based on Neo field's block's sub-fields? #924

Open
proimage opened this issue Aug 13, 2024 · 0 comments
Open

Querying entries based on Neo field's block's sub-fields? #924

proimage opened this issue Aug 13, 2024 · 0 comments
Labels

Comments

@proimage
Copy link

What question would you like to ask?

I have entries with a Neo field. I need to list the entries whose Neo field has a specific subfield which is empty. Eg: entry.neoField.someBlock.fieldOfInterest is empty.

I can test if the Neo field is empty of blocks or not, but I can't figure out if there's a way to delve deeper than that on the initial query. This is the kind of query formatting I tried:

{% set entries = craft.entries
	.section('mySection')
	.neoField({
		block: 'someBlock',
		field: 'fieldOfInterest',
		value: ':notempty:',
	})
	.all()
%}

Is that possible in some way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant