2

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 have been able to add additional parameters to menu items for custom components by editing their xml files. And I know Joomla allows overrides of these files, but I don't think the "external url" menu item is created from an xml file. How could I add an additional parameter to these menu items? Do I need to create some kind of plugin or am I asking for the impossible?

4
  • This question is a duplicate of stackoverflow.com/questions/35607960/… . There is probably pretty much the same users answering the Joomla-tags on SO as answering on joomla.stackexchange.com, so I dont think you'll gain much...
    – jonasfh
    Feb 28, 2016 at 20:31
  • 1
    I originally asked that question, and someone commented to direct me here. The answer here is the correct answer I am looking for.
    – asebold
    Mar 2, 2016 at 20:04
  • I have seen that there are some who encourage people to post here instead of SO. This is no good: If the question is posted on SO, it should stay there unless it is moved by moderator to a different forum.
    – jonasfh
    Mar 2, 2016 at 20:10
  • Regarding your question, if you got the correct answer, you should mark it as correct. However, I am curious how item_url.xml can be overridden? FFRewin seems to have answered this himself here joomla.stackexchange.com/a/4218/360, using an extension. I would not modify core code, as you'll get into trouble when upgrading Joomla.
    – jonasfh
    Mar 2, 2016 at 20:20

2 Answers 2

4

The External URL menu item also has an XML file (like all backend forms in Joomla). You can find it inside:

administrator/components/com_menus/models/forms/item_url.xml

So inside this file (or the corresponding override for it), you could add something like (within the <fields> </fields>:

<fieldset name="custom" label="custom">
    <field name="menu_custom" type="text"
        label="Custom"
        description="Custom" />
</fieldset>

in order to have your custom tab for your custom fields in the backend.

Update:

To create overrides for model form XML files read here: Overriding Core Components Model Form XML

1

For anyone else who runs into this problem:

Technically FFrewin's response was what I was looking for, but it was not the solution to the problem. You can't override those xml files like you can for most other components. I ended up using the plugin that was suggested and it works perfectly for me.

http://extensions.joomla.org/extensions/extension/miscellaneous/form-xml-override

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.