Modify ↓
Opened 15 years ago
Closed 9 years ago
#6850 closed defect (worksforme)
[PATCH] add relative url support
Reported by: | Rémi Demarthe | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | BackLinksMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description (last modified by )
Hello,
This snippet permit to have the right URL link.
16a17
> from trac.resource import get_relative_url
73c74,79
< buf.write('<li><a href="%s">' % self.env.href.wiki(row[0]))
---
> if row[0].find(":") >= 0 or row[0].startswith("/"):
> link = self.env.href.wiki(row[0])
> else:
> # Support relative paths; based on trac/wiki/formatter.py
> link = get_relative_url(self.env, formatter.resource(id=row[0]), formatter.href)
> buf.write('<li><a href="%s">' % link )
Attachments (0)
Change History (4)
comment:1 Changed 12 years ago by
Component: | BackLinksMenuMacro → BackLinksMacro |
---|
comment:2 Changed 9 years ago by
Description: | modified (diff) |
---|---|
Owner: | changed from Trap to Ryan J Ollos |
Status: | new → accepted |
comment:3 Changed 9 years ago by
I'm unsure of what this change is trying to accomplish, so I'll assume it's not relevant to the current codebase.
comment:4 Changed 9 years ago by
Resolution: | → worksforme |
---|---|
Status: | accepted → closed |
Note: See
TracTickets for help on using
tickets.
The functionality of BackLinksMenuMacro is being integrated into the BackLinksMacro.