{%- macro set_value_attr(config_key, attr_name) -%} {%- if config[config_key] is defined and config[config_key] is not none %} viewer.setAttribute("{{ attr_name }}", "{{ config[config_key] }}") {%- endif -%} {%- endmacro -%} {%- macro set_bool_attr(config_key, attr_name) -%} {%- if config[config_key] is defined and config[config_key] %} viewer.setAttribute("{{ attr_name }}", "") {%- endif -%} {%- endmacro -%}