1# This is how you define the macro
2# This is in the file "Input_Block"
3{% macro input(name, value='', type='text', size=20) -%}
4 <input type="{{ type }}" name="{{ name }}" value="{{
5 value|e }}" size="{{ size }}">
6{%- endmacro %}
7
8# Import from the file and set a contextual name
9{% import 'Input_Block' as emailBlock %}
10{{ emailBlock.input("user input") }}