ideas
ideas copied to clipboard
Filter modifier for Antlers
Can we have a filter modifier?
I had this data from a testimonial block
bq_cite:
bq_name: null
bq_position: 'Important Role'
bq_company: 'Company Name'
Using this
{{ bq_cite | join(', ') }}
Output this, notice the comma at the start.
, Important Role, Company Name
I posted this in Discord, and a very helpful member helped me out with this:
{{$ collect($bq_cite)->filter()->join(',') $}}
Which works!
Is it possible to create an Antlers filter modifier?