CMSMS How to move menu element from Extensions to Content section in the admin area?

StackOverflow https://stackoverflow.com/questions/21665318

  •  09-10-2022
  •  | 
  •  

Вопрос

I've installed Form Builder module in the CMSMS. "Form Builder" submenu was automatically added to the Extensions tab. But I'd like to add this submenu to the Content tab instead of Extensions. Does anybody know how to do that?

Thanks in advance.

Best reagards, Igor

Это было полезно?

Решение


Well, it is quite old question, I did find it by accident, but since there is no response I will answer, maybe someone will find it useful later. I don't know if you are able to do that directly via cms panel. However it is doable, you have to modify main module file. Find FormBuilder.module.php file in /modules/FormBuilder in your CMS location. There is function responsible for putting modules in desired sections. Extension sections is default for all modules unless you will specify other section using function below:

/**
* GetAdminSection()
* If your module has an Admin Panel, you can specify
* which Admin Section (or top-level Admin Menu) it shows
* up in. This method returns a string to specify that
* section. Valid return values are:
* 
* main        - the Main menu tab.
* content     - the Content menu
* layout      - the Layout menu
* usersgroups - the Users and Groups menu
* extensions  - the Extensions menu (this is the default)
* siteadmin   - the Site Admin menu
* viewsite    - the View Site menu tab
* logout      - the Logout menu tab
*
* Note that if you place your module in the main,
* viewsite, or logout sections, it will show up in the
* menus, but will not be visible in any top-level
* section pages.
* @return string Which admin section this module belongs to
*/

By default there is no such function in FormBuilder module definition, so you have to add it on your own and then it should change its location. Cheers!

 function GetAdminSection()
 {
 return 'content';
 }


Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top