Last active
March 13, 2019 10:26
-
-
Save EddyVinck/8bfd9233d80f8dc7b0dc84b1071f908d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# In my_email_template.html #} | |
{# Add the control module so authors can change the settings in the template #} | |
{% module_block module "module_1234" | |
module_id="1234" label="Module Usage", | |
overrideable=True, | |
per_widget_wrapper_html='', | |
widget_name='Module Usage', | |
wrapping_html='', | |
label='Module Usage' %} | |
{% end_module_block %} | |
{# Find our global settings module by its' ID #} | |
{% set settings_module_id = 1234 %} | |
{% set module_usage = {} %} | |
{% for custom_modules in content.allWidgets %} | |
{% if custom_modules.body.module_id == settings_module_id %} | |
{% set settings_module = content.allWidgets[loop.index0] %} | |
{% set upd = module_usage.update({ | |
'my_module_name': settings_module.body.my_module_name, | |
'header': settings_module.body.header, | |
'header_links': settings_module.body.header_links, | |
'client_data_rows': settings_module.body.client_data_rows, | |
'hero_image_with_text': settings_module.body.hero_image_with_text, | |
}) %} | |
{% endif %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment