Adding Custom Links under 'Tools' Module?

Discussion in 'Plugins/Modules/Addons' started by LukeW, Feb 6, 2021.

  1. LukeW

    LukeW New Member

    Hello,

    I've recently been doing some modifications to the default ISPConfig Template (using v3.2 of ISPConfig) and wondered how I could add custom links under one of the module pages - tools?

    upload_2021-2-6_14-10-4.png

    Where I've circled above, I'd like to create a new subheading labelled 'Quick-links' with the blue background, and then below hyperlink to our webmail and web-ftp URLs: These would be external ahref links, not internal ISPConfig pages.

    Could someone point me in the right direction to add in this subheading and links? A template path or filename would be really helpful!
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  3. LukeW

    LukeW New Member

    Hello,

    Thanks for this. Navigating to interface/web/tools/lib/module.conf.php and inserting the following code snippet from the URL you sent me:
    PHP:
    $items[] = array(   'title'  => 'Add Domain',
                
    'target'  => 'content',
                
    'link' => 'client/domain_edit.php');
    I wasn't able to get it to work. It just made the top bar totally disappear...

    Is there another way or did I insert something wrong?
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    This would work for a external URL:
    PHP:
    $items[] = array(   'title'  => 'Webmail',
            
    'target'  => '_blank',
            
    'link'  => 'https://webmail.example.com',
            
    'html_id'   => 'webmail');
     
    Jesse Norell and LukeW like this.
  5. LukeW

    LukeW New Member

    Perfect - thank you so much! That worked perfectly :)
     
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    No problem, glad to hear it worked :)

    Remember that these changes will be lost when updating ISPConfig, so you will have to keep a backup and paste it back after updating (don't overwrite the whole file as this would remove changes we made in a update).
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Instead of editing the tools menu, create a new file in the tools/lib/menu.d/ folder, similar to the ones you find there, and remove it from module.conf.php file. This will make your menu item update safe.
     
    Th0m likes this.

Share This Page