WithCandour / statamic-aardvark-seo

Candour's SEO addon for Statamic
https://statamic.com/marketplace/addons/aardvark-seo
11 stars 18 forks source link

Ensure view data compatibility across Statamic Antlers versions #168

Open jonrcarey opened 5 months ago

jonrcarey commented 5 months ago

Update the view rendering logic to handle different Statamic Antlers versions. For "regex" versions, use the Laravel view helper with a check to convert $data to an array if it is a collection. For other versions, consistently use the Statamic View facade with $data->all() to ensure $data is always passed as an array. This change guarantees that view data is correctly formatted regardless of the Antlers version or the data type.