How to add a new attribute in menu item in joomla

851 Views Asked by At

I want to add a new attribute "rel" in a menu item in joomla. To add display a modal box on click of menu item I need to add "re" attribute. for e.g. at present the menu item is - <a href="#" class="someclass"> ... </a> I want - <a href="#" class="someclass" rel"something"> ... </a>

After a research I found that updating a file - /modules/mod_menu/tmpl/default_url.php should help. But when I am trying to update this file it does not reflect any changes on joomla backend.

Can anyone please suggest what should be the possible solution?

TIA

1

There are 1 best solutions below

0
Aung Myo Linn On

Obviously, your file "/modules/mod_menu/tmpl/default_url.php" is for site/frontend menu, not for the administrator/backend menu.

However, regardless of frontend and backend, if you want to modify any view of joomla's components or modules or layouts, then you must override it in your template's html folder.

In your scenario, your file should reside in "/templates/mytemplate/html/mod_menu/default_url.php"