Saturday, December 7, 2013

How to use special characters in menu titles in joomla

The following tutorial will show you how to add special characters to the Joomla menu titles.


Sometimes when you add a special character to the menu title in Joomla, it is reflected like it’s predefined code on your website


Special_characters_in_joomla_menu_012


Special_characters_in_joomla_menu_02


In order to resolve the issue you need to open the following file on your server:


modules/mod_menu/helper.php


And find the line:


$item->title = htmlspecialchars($item->title);

 


You need to add the following code before this line:


 $item->title = str_replace(
array('<','>','&'),
array('<','>','&'), $item->title);

Where the first array consists the list of the predefined character codes, the second array reflects the symbols of the predefined code.


Special_characters_in_joomla_menu_031


Please, note that such symbols as ‘, ” at the second array should start from backslash \ e.g.


array('<','>','&','\'','\"'), $item->title);

You may find more special symbols and their predefined codes on the following page:


Enjoy your updated website:


Special_characters_in_joomla_menu_041



How to use special characters in menu titles in joomla

No comments:

Post a Comment