简体   繁体   中英

How to add a new attribute in menu item in joomla

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 eg 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

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM