Re: Best way to do a dynamic sidebar?

2006-05-18 Thread Luke Plant
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

Re: Best way to do a dynamic sidebar?

2006-05-17 Thread Don Arbow
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

Re: Best way to do a dynamic sidebar?

2006-05-17 Thread Jay Parlar
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

Re: Best way to do a dynamic sidebar?

2006-05-17 Thread Adam
> 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 --

Re: Best way to do a dynamic sidebar?

2006-05-16 Thread Malcolm Tredinnick
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: > > >

Best way to do a dynamic sidebar?

2006-05-16 Thread Jay Parlar
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