Overwriting parent blocks not working in included files

20 views
Skip to first unread message

Pete

unread,
Aug 4, 2011, 4:53:24 PM8/4/11
to H2o template PHP
Hi,

lets say we have 3 files:

1. base.html with content:
<head>
{% block scripts %}
</head>

2. index.html with content:
{% extends 'base.html' %}

<!-- content of the page -->
{% include 'include.html' %}


3. include.html with content:
<!-- content of the included file -->
{% block scripts %}
<script>blahblah</script>
{% endblock %}


Problem is that block scripts in base.html is not getting overwrited
with content from include.html. :(

Any tips how to resolve this problem?
Reply all
Reply to author
Forward
0 new messages