modified layout to jinja2 template