I'm trying to return entries where a specific field named "productSale" is not empty. Unfortunately, my code attempts keep throwing the "Expected name or number" error.
Code attempts include:
{% set products = craft.entries.section('product').productSale.(':notempty:').find() %}
{% set products = craft.entries.section('product').productSale.('not null').find() %}
{% set products = craft.entries.section('product').productSale.('is not null').find() %}
{% set products = craft.entries.section('product').productSale.('not empty').find() %}
Three questions then:
- What is the "Expected name or number" error saying exactly?
- Where in the available docs (Craft or Twig) would I look for explanation on this? I didn't find much in my first pass.
- How do I return entries where a specific field is "not empty"