You are not logged in.
Pages: 1
Good morning,
I would appreciate if you could help me with a problem that I am having when creating new menus and associating objects in them under GLPI v.10.0.10. I've been thinking about it for days and I can't find a simple solution. Let me explain briefly:
My goal is to create new menus in the GLPI interface for example "Services" (among others) and that each of them is drop-down and shows me a series of objects that I will previously create.
As I did not find a plugin that would allow me to create new menus, I decided to modify the PHP code of the Html.php file.
For the creation of the objects I am using the "GenericObject" plugin. The problem I am having is that I can't make reference to the specific object that I create through the plugin to appear in any of the menus and I always end up appearing all the objects I have created in all the menus I create, and if I create new objects, they also appear in all the menus I have created...
Initially, I create through the plugin Generic Object the objects "adsl" and "lte". later in the menu creation function (getMenuInfos) of the "Html.php" file I add the following:
'Service' => [
'title' => ('SERVICES'),
'default' => '/front/preference.php',
'types' => ['PluginGenericobjectAdsl'],
'icon' => 'fas fa-user-cog',
'display' => true
],
This effectively generates a new menu called Services in the interface, the problem is that when I deploy it all the objects of the plugin GenericObject appear (Adsl, lte and the rest) and not only the one I want (which in this case would be the one called "Adsl"). I tried to use type, content, etc without results, if I use them I get a button that when I press it goes to 'default' but not a list. the only way I get a dropdown menu is by using types in which case all objects appear as I commented.
According to what I saw in the plugin folder, for each new object that I create a GenericObjectNAME class is generated but even if I make reference to this or the generic class, I always get all the objects. I don't know if I am doing something wrong.
How could I modify the menu definition that I commented so that when I deploy it, only the object that interests me appears and when I click on it, I go to it? how do I reference it?
sorry for my bad English, I used a translator, I hope my query is understood.
Thank you in advance for any help in this regard,
Greetings!
Offline
Pages: 1