We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

friendlyTitle don't support accents

Hello to all,

I've read the doc searching for a slug method and I found Phalcon\Tag::friendlyTitle but letters with an accents are delete. I didn't find how to solve it. Any idea?

Thanks for advance and sorry for my poor english.

Two solutions :

  • You can try to add your own friendlyTitleWithAccent function to volt that will convert accent to non accent characters, then this function will call the default friendlyTitle
  • Call a function that remove accent then call friendTitle

You may also open an issue on github (cphalcon repo), maybe it needs to be considered as a default behaviour in the future versions !

Add a function to volt : https://docs.phalcon.io/en/latest/reference/volt.html#extending-volt Quick example of removing accents : https://stackoverflow.com/questions/3371697/replacing-accented-characters-php

@SneakyBobito and @Phalcon Thanks for the information. I'll test it as soon my job let me free.

@SneakyBobito I think this will be a usefull behaviour.