Joomla web developer, Joomla Web Development

Using special characters in the menu items in Joomla

Rushik Shah User Icon By: Rushik Shah

Screenshot from 2014-08-01 12:13:31

There are times when you need to include characters to the titles in your menu items. This should be ideally possible. But at times when you do place special characters on the menu they don’t appear correct on the user end. What ends up being displayed is the HTML code of the special character. For example at times when you add the special character ‘&’ what actually appears on the website is ‘&amp’. This is minor issue that has the possibility of destroying the look and feel of your website and hence should not be taken lightly.

Thus this issue needs to be solved and it can be done by following the simple instructions provided below.

  • To start with login to you web server via FTP.
  • Once logged in navigate to the directory modules/mod_menu/ and download the file helper.php.
  • Now open this file I your favorite editor.
  • You need to use the powerful search features present in your editor to search for the following section of code.                                                                                                                                      $item-.title = htmlspcialcharacters(item->title);
  • Once you do find the code above add a few lines above it and add the next few lines above it.        $item->title = str_replace( array(‘&lt’, ‘&gt’, ‘&amp’), array(‘<’, ‘>’,’&’, ), $item->title);
  • Here the first array consists of a list of predefined character codes and the second array contains the symbols of the predefined code.
  • In this case your system will allow you to now enter the special character ‘&’ with ease. However if you wish to add additional special characters you need to do so in a similar way. First get the predefined character codes for the predefined symbol and follow the same procedure as we mentioned above to ‘fix’ the website.

You will now have the ability to add special characters to you menu titles with ease. Joomla in general is quite easy to use. It is likely that you may require the help of a professional Joomla web developer initially to set up you website, but it is easy for you to maintain the website yourself. The user interface is so easy that you may be able to even add addition functionality in the form of modules to your website.

 

  • functionality of joomla
  • How to use special characters in menu titles in joomla
  • Joomla
  • joomla web developer
  • special characters in joomla

What’s Next ?

I know after reading such an interesting article you will be waiting for more. Here are the best opportunities waiting for you.

Share via
Copy link
Powered by Social Snap