Search for Resources and Solutions

set_panel_tabs_collapses_modules - adds modules in the panel

A module in the Midrub Emails Composer is a collection with elements. Why them could be useful? For example you have a module with buttons and the user could custom each button as element. Another use could be to have two elements(photo + your name) and drag and drop in any template easy. 

The  Midrub Emails Composer allows to the user to create his elements and modules. The modules can be created even from the column because it allows to save all the column's elements in a module. 

To add new modules in the Midrub Emails composer's panel you have to use the method set_panel_tabs_collapses_modules. This method works in same way like the set_panel_tabs_collapses_elements and you can decide in which panel's collapse your modules will be added.

The method set_panel_tabs_collapses_modules has these parameters:

  • name - contains the module's name. Is a string.
  • slug - contains the module's slug. Is a string. All slugs should be original.
  • icon - contains an icon. I'm using the icons from Should be html.
  • collapse_slug - indicates the location. Is a string.
  • elements - contains an object with same parameters which provides set_panel_tabs_collapses_elements but without collapse_slug.

In the video below you can watch how to add new modules with the set_panel_tabs_collapses_modules metod:

Was this article helpful?