tera
tera copied to clipboard
Inconsistent inheritance when mixing include and blocks
When I create a partial that's included in parent html and that partial contains a block, that block is not being overridden when in a child overrides it:
- I create a base.html with:
<!DOCTYPE html>
<html>
{% include "header.html" %}
</html>
- I create a header.html with:
<head>
<title>{% block title %}Title in Header{% endblock title %}</title>
</head>
- I create article.html with:
{% extends "base.html" %}
{% block title %}
<title>Article Title</title>
{% endblock title %}
Expected behavior is for title block from article.html to override base.html. It does not.
This may be related to feature #532 with inheritance breaking macros import.
Thank you!
I met this problem too.
It's the same yes. The current parser is not very smart and doesn't handle cases like this or macros well. It will be fixed for v2