Hi folks,

Okay, so I got my little staticpages app working (thanks adrian), and  
now I can happily throw sometemplate.html in my templates/ directory  
and I can view the page at mysite/sometemplate. Great! And it extends  
my base.html template too so all my header/footer stuff is DRY. Hooray!

But what about the bits that change from page to page, like the page  
title, or the body "id" attribute, html metatags, etc. Is there any  
convenient way to pass those values in from the child template? Right  
now I'm using blocks in my base.html like this:

<body id="{% block page_id %}{% endblock %}">

Obviously it would be much nicer though to have something like this:

<body id="{{ page.body_id }}">

But then I have to set that variable in the view right? The thing is,  
I want to use url mapping to templates for static pages so that I  
don't have to write a view method for every static page of the site.

Is there any way then to more elegantly set the page title, body id,  
etc without using blocks and without writing view methods?

Cheers,
Sean


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to