This addon helps you DRY up your templates with a tag that makes it trivial to output data nested in arrays with variable keys.
For the Laravel devs out there, this works very similarly to the Arr::get()
(or the old array_get()
) helper.
I use it most often to simplify markup for component variants.
For example, on Highland's website we use several different color variants for our navbar and logo. Each variant requires setting several classes across six elements.
Rather than repeating markup with slight differences…
…or a bunch of conditionals inside class attributes…
…or a bunch of conditionals inside section/yield tags…
…configure your variants with front-matter!
This approach often makes it way easier to add more variants later.