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 https://lineicons.com/icons/ 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:
- How to export the email templates as HTML code
- How to translate the Midrub Emails Composer
- How to change the icons in the Midrub Emails Composer
- set_methods - sets default methods
- How to add default settings to a Midrub Emails Composer's template
- helper_setup_template - generates the template's JSON code
- helper_run_lib - provides parameters to the run function
- How to export the Midrub Emails Composer's templates as a JSON's code
- set_composer_header_items - how to add dropdown
- set_composer_header_items - add links in the composer's header