<body> <div id="header"> ... </div> <div id="content"> {% block content %} 
{% endblock %} </div> </body> 

category.html :
{% extends "base.html" %} {% block content %} <div class="category_row"> <
div id="menu_category_display"> {% for category in menu_categories %} {% 
with category_button="menu_"|add:category.name|lower %} <button class="button 
category_buttons {{category_button}}" onclick=
"showItem('{{category_button}}','category_buttons')"> {{category}} </button> 
{% endwith %} {% endfor %} </div> </div> <div class="item_row"> {% block 
level_2_content %} {% endblock %} </div> </div> {% endblock %} 

and item.htlm
{% extends "category/category.html" %} {% block level_2_content %} <div id=
"test_div"> {% for item in menu_items %} <p>{{item.name}}</p> {% endfor %} 
</div> {% endblock %} 

When item.html is rendered, all the elements that were rendered by 
category.html are gone. Only the elements of the base.html are retained. 

In the code above, the entire category_row div does not appear in item.html. 
How do I retain them?

How do I retain all elements in all parent templates instead of just 
base.html? A general method to do this for more than 3 levels of extension 
like in my case?


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5c52b701-9a60-4ac6-ae90-072a1d9ae2bbn%40googlegroups.com.

Reply via email to