We currently updated our Squirrely dependency from Version 7 to Version 8 and with this it's needed to update your blok preview templates as well as your advanced path configurations to keep them maintainable over time.
Object Reference:
Old: Use options as the object reference.
New: Use it as the object reference.
Loop Syntax:
Old: Use {{each(array)}} and {{foreach(object)}}.
New: Use {{@each(array) => val, index}} and {{@foreach(object) => key, val}}.
New: Access properties using the object reference, e.g., {{it.story.slug}}.
Arrow Functions in Loops:
New: Use arrow functions to destructure values and indices in loops like {{@each(array) => val, index}}
How to migrate the Blok Preview Template
How to migrate Advanced Path Configurations
How to migrate configurations with "translatable slugs"
With the update to Squirrelly 8 we provide a helper called @activeTranslatedSlug , you can find out more here.
🍪 Cookie Notice
We use cookies to learn how you interact with our content, and show you relevant content and ads based on your browsing history. You can adjust your settings below. Here's our policy.