set_panel_tabs_collapses_elements - adds new elements in the panel
set_panel_tabs_collapses_elements is the Midrub Emails Composer's method which allows you to add new elements in the panel. The method's name is long but is important to avoid the conflicts and to understand where will be added the elements.
With set_panel_tabs_collapses_elements you can add one or more elements in a collapse. With the collapse_slug parameter you can decide the location of the elements and the icon will be like a cover.
The elements in the Midrub Emails Composer are the options which you can use to create your original email template. You can drag and drop the elements in your template and then you can custom the element.
Midrub Emails Composer has these parameters:
- name - contains the element's name. Is a string.
- slug - contains the element'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.
- tabs - contains the elements tabs. Should be an object.
The elements tabs have these parameters:
- name - contains the tab's name. Is a string.
- slug - contains the tab's slug. Should be original. Is a string.
- libs - contains an array with libs to use.
The libs are the most interesting feature in Midrub Emails Composer and in the following articles will be explained how to use them.
- 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