Hello

Could u share your code of the new template extends tag? I have very
similar problems here.

Kind Regards

Enoch Qin

On Nov 27, 5:58 pm, jorjun <[EMAIL PROTECTED]> wrote:
> OK, managed to do this in the end, by creating a new template tag and
> node derived from django.template.loader_tag.ExtendsNode
> overriding the get_parent method.
>
> Now we have total white labeling of all our templates, including base
> templates.
>
> Django rocks.
> On 27 Nov, 12:20, jorjun <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am trying to work out the best way to allow dynamic template
> > substitution based on RequestContext
>
> > Could anybody point me in the right direction? I don't know if I need
> > a new template loader, or I need to create new tags.
>
> > But in this case :
>
> > {%extends"myapp/base.html" %}
>
> > I would like it to look in "client1_overlay/base.html" if found,
> > otherwise to default to the normal template loading mechanism.
> > If client2 requests a page, then I need to use a different template
> > "client2_overlay/base.html" if found.
>
> > Basically I want to customiseTEMPLATE_DIRSdepending on information
> > in the RequestContext. This way I can implement 'dynamic skinning'.
>
> > Suggestions, comments, advice greatly welcomed.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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