Skip to main content
2 of 3
informed that i know about the general concepts
Marco
  • 691
  • 5
  • 14

Select Article Field like it is used in com_menu to select an article in a PopUp

For one of my projects (Custom Module) I would like to have a "com_menus"-styled modal to select an article - unfortunately it looks like this is not a "default form field type".

Based on my investigations of the com_menus item.xml (where such a field got rendered) the effective "article selector" is hidden behind a field type called "menutype" which looks to me like a core-custom dynamic field which renders a field (-template) based on the field above named "menutype".

If Single Article is selected it loads a field of type modal-select (modalSelect) -> but this only renders the effective inputfield with readonly - no buttons no functionality (which is obvious when checking the source code).

In the com_menus file structure there is in layouts an extra-buttons.php which looks like it renders the additional Select Button. But I have no clue how this is implemented and for me it looks a bit like "component-magic" which I cannot adapt in a module.

All in all I'm lost - I know I could simply create a fancy-list item getting all articles and having a search option there but i think on large sites this would not be the best / performant practice.

Did anyone already figured out how to create such a modal article selector field which makes use of the com_content modal article select layout?

Edit: I'm aware of the general concepts described here

Marco
  • 691
  • 5
  • 14