On Wed, May 12, 2010 at 4:10 PM, Brian <you...@gmail.com> wrote: > Help: > > Chapter 4: The Django Template System > http://www.djangobook.com/en/1.0/chapter04/ > > This example includes the contents of the template whose name is > contained in the variable template_name: > {% include template_name %} > > > All i'm trying to do is dynamically include an html template file: > > This works just fine: > {% load "FooterMessage.htm" %} > > This will NOT work for me: > {% load "{{inpage.footer}}" %} > > fyi: (I know that inpage.footer == "FooterMessage.htm") > This {% load "{{inpage.footer}}" %} isn't valid syntax. You can't do variable interpolation inside template tags. Furthermore, the {% load %} tag is for loading custom template tag libraries, not including extra content. You want the {% include %} tag, as you correctly state in the first paragraph.
It isn't usually necessary. In this case, this should work: {% include inpage.footer %} Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.