I would like to reuse the following code several times:
body.html file
<div class="container-fluid">
<div class="row">
<div class="col-md-2 text-dark">
...
<p>Download: <a href="{{ link }}" class="link-secondary">link</a></p>
</div>
<div class="col-md-10">
<iframe src="{{ link }}" style="min-height:88vh;width:100%"></iframe>
</div>
</div>
</div>
In the sfa.html file I want to use body.html file and passing the the following argument: "{{url_for('static', filename='pdf/Lorem-Ipsum.pdf')}}"
sfa.html
<!DOCTYPE html>
<html>
<head>
{% include 'header.html'%} //works fine
</head>
<body>
{% include 'nav.html'%} //works fine
{% include 'body.html' with 'link' : "{{url_for('static', filename='pdf/Lorem-Ipsum.pdf')}}" %} //here is the problem
</body>
</html>
I am getting the following error in the browser: jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'with'
What is the problem with my code?