Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

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 answerthis 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.

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.

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.

replaced http://craftcms.stackexchange.com/ with https://craftcms.stackexchange.com/
Source Link

Okay, so, thanks to carlcs' answercarlcs' 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.

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.

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.

Source Link
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.