Search code examples
phpjoomlajoomla2.5joomla3.0

Joomla 3.x: How to allow underscore in menu item aliases


Unfortunately, Joomla 3.x replaces underscore in menu item alias with hyphen.

How can I allow underscore? [without sh404SEF].

I don't see it in libraries/joomla/filter/output.php (as the page Use underscore (_) in joomla menu alias says).


Solution

  • In that file there is the line:

    $str = preg_replace('/(\s|[^A-Za-z0-9\-])+/', '-', $str);
    

    Put _ between z and 0