ez 3.10 urls and files accents

Author Message

Jean-Luc Nguyen

Tuesday 27 November 2007 1:40:16 am

Hello there,

I have just installed a clean version of ez 3.10, and we are developping a french website. French may contain accents, like "Traité de modélisation". When we are creating content with accents, the ezoperator ezurl should delete all accents (it was in 3.9), and ez 3.10 also creates bad files or images names on storage, like "Môn-produït-à véc-dès-accènts.jpg". Is it a bug for ez 3.10?

Thanks a lot for your help, ez rules!

http://www.acidre.com

Paul Leclercq

Tuesday 27 November 2007 8:59:25 am

No this isn't a bug for 3.10. ezurl will not get ride of the accents in a string.
All ezurl operator will do is check the various siteaccesses and find the which file it should use.

You can also specify 2 options to |ezurl('no', 'full')

'no' will get ride of the quotes surrounding your url and 'full' will specify the full url such as http://www.mydomaine.com/index.php/siteaccess/myurlalias

What you are suppose to do is

<a href={$node.url_alias|ezurl()}>my link</a>

here is the doc for ezurl:
http://ez.no/doc/ez_publish/technical_manual/3_10/reference/template_operators/urls/ezurl

This may be a little off the subject:
But In some obscure moment you may not be able to access the url_alias of your object and you will only get the string. Then this would be the code for your operator:

function convertToAlias($string){
include_once( 'kernel/classes/ezurlalias.php' );
$new_string = eZURLAlias::convertToAlias($string );
return $new_string;
}

And he is the documentation on how to create an operator:
http://ez.no/ezpublish/documentation/development/extensions/template_operator

Jean-Luc Nguyen

Thursday 29 November 2007 9:33:01 am

Yes I actually saw that, thanks a lot. When you are installing ez 3.10, after that, if you have unicode website but you wish to have standard urls like on 3.9, you have to add on site.ini:

[URLTranslator]
TransformationGroup=urlalias_compat

More info here: http://ez.no/doc/ez_publish/technical_manual/3_10/features/multi_language_support_for_url_aliases

I hope this will help!

http://www.acidre.com

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