asebold
asebold

Reputation: 335

Template specific parameters for menu item in joomla

I have a menu in joomla that appears on all pages. Some of the items in the menu should be the same on every page, while others need to be dynamically updated based on the page the user is on. I am trying to create an override for the "external url" menu item type (listed under system links), that would allow me to create a menu item parameter the user could populate. Then, I could use this parameter in the menu template to determine what needs to be added to that particular link.

I understand Joomla overrides for the most part, but I can not figure out where the xml file for these system link menu items is located. If my understanding is correct, overrides should be stored in templates > myTemplate > html > com_myComponent or mod_myModule. I would assume if I knew what component the system links fall under, I could create an override for the xml file. Is this correct or way off?

TL;DR: Where is the xml file for menu item type "external url"?

Upvotes: 0

Views: 349

Answers (1)

jonasfh
jonasfh

Reputation: 4579

It seems there is no specific xml-files for the system links, as they are defined directly in

administrator/components/com_menus/views/menutypes/view.html.php

which means there is no xml-file to override. You can, however, override the view class MenusViewMenutypes, which is defined in the view.html.php-file. This is done by writing a system plugin loading a file containing the same class. The recipe is simply and beautifully described here.

Upvotes: 2

Related Questions