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 <[email protected]> wrote:
> On Wed, May 12, 2010 at 4:10 PM, Brian <[email protected]> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
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.