3xM wrote:
> Inside a template, is there a way to decide whether it has any parent
> template(s) or it is the root template?
> 
> I've got some templates including each other, but also want to be able
> to view them individually. But i still want the root template to
> extend my base template.
> 
> I'm looking for something like this to put in top of all the
> templates:
> 
> {% if is_root_template %}
>   {% extends "base.html" %}
> {% endif %}

By "root" do you mean the url that arrived at the template is a "/" root 
url.

If so, I would determine this in the view and pass in a template 
varible, 'is_root'.  But I don't think wrapping an extends in a if/endif 
will work.


Or do you mean the template is root as in it doesn't extend any other 
templates.

In that case just skip the if/endif because a template only extends 
another if you tell it to.


-- 
Norman J. Harman Jr.
Senior Web Specialist, Austin American-Statesman
___________________________________________________________________________
You've got fun!  Check out Austin360.com for all the entertainment
info you need to live it up in the big city!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to