On 6/6/06, Doug Van Horn <[EMAIL PROTECTED]> wrote: > I have page components that are common across many of my pages. Here > are a few of them: > > == A user specific menu, cached in the session. > == A shopping cart, cached in the session. > == A list of recently visited items, cached in the session. > > My current approach to making these objects available to a template is > to have a 'base_dict(request)' function that returns a dictionary > containing the common things under well known names (e.g., { 'menu': > menu, 'cart': cart, 'recent_items': recent_items}).
Sounds like the perfect use case for a custom template tag via the "inclusion tag" helper. http://www.djangoproject.com/documentation/templates_python/#inclusion-tags Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---