On Fri, Apr 25, 2008 at 6:35 AM, Grupo Django <[EMAIL PROTECTED]> wrote:
>  I have this template code:
>  <title>{% block title %}{% endblock %}</title>
>  <meta name="DC.Title" content="{% block title %}{% endblock %}" />
>
>  And I get the error: 'block' tag with name 'title' appears more than
>  once.
>
>  What could I do to make this work?

I don't know if it's suitable for your case, but I have that working
by including the two title blocks in separate templates. That is, I
have three layers of templates going on, like so:

structure.html
base.html
individual_page.html

The structure and base templates each define one block called "title"
so Django's happy with that. Then, each individual page declares a
title block just like you illustrated, and everything works fine. The
title gets dropped in both places, and everybody's happy.

Of course, I don't know quite enough about how template inheritance
works internally yet, so I don't know if it's supposed to work that
way, or if I'm relying on some bug that might get fixed out from under
me. YMMV.

-Gul

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