Tom Thank you, Thanks you, Thank you. {% include inpage.footer %} works just fine. The {{}} is unnecessary as I had it.
Sometime the brain is not working. Thanks again. On May 12, 11:36 am, Tom Evans <tevans...@gmail.com> wrote: > On Wed, May 12, 2010 at 4:31 PM, Brian <you...@gmail.com> wrote: > > Tom, I'm sorry > > I am using include and it's not working: > > Dynamically content in include statement not working: > > > This works just fine: > > {% include "FooterMessage.htm" %} > > > This will NOT work for me: > > {% include "{{inpage.footer}}" %} > > > (I know that inpage.footer == "FooterMessage.htm") > > > On May 12, 11:19 am, Tom Evans <tevans...@gmail.com> wrote: > >> 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 > > Did you read my email at all? I clearly explained why that method does > not work, and clearly gave you an alternative that should work. > > 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 > athttp://groups.google.com/group/django-users?hl=en. -- 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.