See new-admin branch or ticket #598. It just needs to be applied to trunk.
Also, be aware that you can extend a template whose name is in a variable.
in path/to/template:
{%extends parent%}
{%block content %}
...your central content...
{%endblock%}
in main view:
render_to_response('path/to/template', {'parent': 'base'})
in popup view:
render_to_response('path/to/template', {'parent':'popup'}
And make sure both 'base' and 'popup' templates have a block called content.
