You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a new modules requires to modify several files in the code.
General idea
register a module in php => the registered params will be used both when customizing and on front end
register a module in js => to motorize the ui when customizing
create a php template file => for the rendering on front and when customizing
Files to add / modify as of June 2018
inc/sektions/_dev_php/module_registration/4_0_0_sek_register_modules_after_setup_theme_50.php => this is where we declare the php functions in charge of loading the modules registration params + the module is registered
inc/sektions/_dev_php/module_registration/front/4_1_0_sek_register_{module_name}.php => the file in which the registration callback has to be declared.
assets/czr/sek/js/_dev_control/modules/front/_9_1_9_FRONT_{module_name}.js => the file where the customizer module can be registered to the api.czrModuleMap
inc/sektions/_dev_php/input_tmpl/3_0_1_sek_input_tmpl_module_picker.php => this is where we add new modules so they are draggable when customizing
tmpl/modules/{module_name}_tmpl.php => this is where all modules rendering php templates are located. Used both on front end when customizing and when published. The template path is declared as a param when registering the module in php.
__grunt-tasks-config__/concat.js => the concatenated files have to be updated with the newly added files
When the module needs specific localized params, like a list of options for a select input for example, or a translation string :
inc/sektions/_dev_php/1_0_0_sektions_customizer_assets.php => can be used to register localized params for the modules
Adding a new modules requires to modify several files in the code.
General idea
Files to add / modify as of June 2018
inc/sektions/_dev_php/module_registration/4_0_0_sek_register_modules_after_setup_theme_50.php
=> this is where we declare the php functions in charge of loading the modules registration params + the module is registeredinc/sektions/_dev_php/module_registration/front/4_1_0_sek_register_{module_name}.php
=> the file in which the registration callback has to be declared.assets/czr/sek/js/_dev_control/modules/front/_9_1_9_FRONT_{module_name}.js
=> the file where the customizer module can be registered to theapi.czrModuleMap
inc/sektions/_dev_php/input_tmpl/3_0_1_sek_input_tmpl_module_picker.php
=> this is where we add new modules so they are draggable when customizingtmpl/modules/{module_name}_tmpl.php
=> this is where all modules rendering php templates are located. Used both on front end when customizing and when published. The template path is declared as a param when registering the module in php.__grunt-tasks-config__/concat.js
=> the concatenated files have to be updated with the newly added filesWhen the module needs specific localized params, like a list of options for a select input for example, or a translation string :
inc/sektions/_dev_php/1_0_0_sektions_customizer_assets.php
=> can be used to register localized params for the modulesExample
The heading module => 8a90aca
The text was updated successfully, but these errors were encountered: