Jacob Kaplan-Moss wrote: > On Sep 20, 2005, at 8:31 AM, [EMAIL PROTECTED] wrote: > > In a template tag, can I get request.path from the context object? > > Since I'm going to use this everywhere, I don't want to put the > > code is > > a custom view. > > No, template tags do not have access to the request object (because > you might be using the template system separately from the request > handling framework).
...unless of course you have already put the request object, or parts of it, into the context. Template tags are passed the context object, from which you can extract the request, providing you know it's going to be there and under what name. Luke