Skip to main content
1 of 3
rppld
  • 336
  • 1
  • 7

Okay, so, thanks to carlcs' answer I managed to solve the camel-case to lower-dash-case conversion. The other direction was a bit trickier, but again, after digging in a bit deeper I was able to figure it out myself:

First off, I'm not using the plugin any longer! Yay! The secret was to create a custom Twig filter that would convert dash-separated strings like so:

{{ 'my-first-car'|dash2camel }}
{# outputs 'myFirstCar' #}

With the help of this guide and some code from this answer I created my own custom Twig filter within Craft. Nothing fancy and hacked together quickly, but I've put it on GitHub if someone runs into the same issues.

rppld
  • 336
  • 1
  • 7