On Wed, Oct 1, 2008 at 1:31 PM, FC <[EMAIL PROTECTED]> wrote: > > Ok, I've found out this: > > http://code.djangoproject.com/ticket/6510 > Block inheritance works fine within {% if %} tags, but not within {% > ifequal %} or {% ifnotequal %} tags, as illustrated by the code below. > > I guess that is the problem. > Someone knows if this issue is going to be resolved or if I should > just look for a workaround? > > Basically what I need to do is this: > I have a list of objects on screen and I need to mark one as active so > a child template can override it with something. The amount of > objects, their positions and the position of the active one are > defined at render time. > My solution was to use a for loop and check for a condition inside > that loop, if that condition was true then I put a block around the > object so the child template would extend that block and leave the > rest of the objects be rendered by the parent. >
Glad you found what's causing the problem. I do not have time (nor the expertise in template logic/implementation) at the moment to puzzle through the back-and-forth in that ticket as to whether this should or should not work. Perhaps if you posted your use case to the ticket it would help in moving it out of design decision needed. You could also try out the patch from the ticket and give feedback on whether it works to fix the problem for you. Karen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---