Thanks Ted,

> On Thu, Oct 30, 2008 at 11:10 AM, Ted Gifford <[EMAIL PROTECTED]> wrote:
> > req.base_path looks like what you want. Here's a sample:
> >     req.outcookie['trac_form_token']['path'] = req.base_path or '/'
On Oct 30, 3:14 pm, "Ted Gifford" <[EMAIL PROTECTED]> wrote:
> Or perhaps req.abs_href or even self.env.project_url

I tested this now with single- and multi-project trac servers:

self.env.project_url   returns always the server base url, e.g.
''http://trac.example.com/";.
req.abs_href            returns always an empty string
req.base_path         gives me what I was looking for: '/
project1' (multi-project) or an empty string (single-project).

BTW, I'm getting the req object in the macro using:
req = formatter.req

Thanks a lot for this, I searched for documentation but couldn't find
anything and I went a little through the
trac source code but it difficult to find something there when you
don't know what you exactly look for.

Martin


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
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/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to