On Tuesday 16 May 2006 22:24, Jay Parlar wrote:
> It feels like I should be able to define a template just for the
> sidebar, and insert the content of that template into whatever
> template is being rendered. I guess that the 'include' tag would do
> that, but then I'd need to explicitly pass
On May 17, 2006, at 5:17 PM, Jay Parlar wrote:
>
> I'm not seeing 'inclusion_tag' in the docs anywhere, is it meant to be
> a public API function?
inclusion_tag is defined in django/template/__init__.py
and is explained here
http://code.djangoproject.com/ticket/625
Don
On 5/17/06, Adam <[EMAIL PROTECTED]> wrote:
>
> > It feels like I should be able to define a template just for the
> > sidebar, and insert the content of that template into whatever
> > template is being rendered.
>
> The way I look at it, that's pretty much what you're doing if you write
> a
> It feels like I should be able to define a template just for the
> sidebar, and insert the content of that template into whatever
> template is being rendered.
The way I look at it, that's pretty much what you're doing if you write
a custom inclusion tag:
-- custom tag file --
Hi Jay,
On Tue, 2006-05-16 at 17:24 -0400, Jay Parlar wrote:
> As an example, say I'm building a blogging app, and I want a right
> sidebar that always shows the last X post titles. What's the best way
> to template this?
>
> I've though of something like the following in a base.html:
>
>
>
As an example, say I'm building a blogging app, and I want a right
sidebar that always shows the last X post titles. What's the best way
to template this?
I've though of something like the following in a base.html:
{% block sidebar %}
{% last_posts_list %}
{% endblock %}
Where
6 matches
Mail list logo