URL version of a string

Author Message

Damien MARTIN

Tuesday 09 March 2010 2:40:17 am

Hi there,

I was looking for a way to get the URL version of a string in PHP, but I don't found anything in the API.

What I'm looking for is :

  • Convert : "My string qu'elle est belle from Paris"
  • In : "My-string-qu-elle-est-belle-from-paris"

It is exactly what eZ does when you create a new content.

Thanks in advance,

Damien

Damien MARTIN

Tuesday 09 March 2010 2:56:23 am

I just found the answer to my question with this post : http://share.ez.no/forums/developer/multilingual-japanese-url-alias

So, the method is :

eZURLAliasML::convertToAlias($my_string);

Hope this will help :)

Damien

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.