Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hello I need a string that transforms an Title-string to an URL friendly string.

eg.:

Title-string: My Vintage Cars
URL friendly string -> my_vintage_cars

I know how to do this with PHP, but is there a way couch transfoms this for me before saving to DB. If not I do this during the website output from DB 2 Website.
* * * * * * I LOVE COUCH CMS - flexible and straight forward * * * * * *
Couch automatically does this for the 'Title' of every cloned page.

If you wish to perform a similar action on any other string, use the following -

Code: Select all
<cms:set my_title='My Vintage Cars' />

<cms:php>
   global $FUNCS;
   $url_friendly_title = $FUNCS->get_clean_url( '<cms:show my_title />' );
   echo $url_friendly_title;
</cms:php>

Hope this helps.
I can work with this, great to have you on support! It is fun working with couch.
* * * * * * I LOVE COUCH CMS - flexible and straight forward * * * * * *
3 posts Page 1 of 1