
Project: DominoWiki (Managed by Benedict R Poole)
 | 

 |  |
| Subject | Fix for this issue |
| Created | 02/05/2007 10:21 AM by Steven Searson. |
| Modified | <none> by <none>. |
One of our customers (NYK Line) have implemented DominoWiki and came across this same issue. I've had a delve into the code and found a solution:
If you open the WikiPage.class script library and replace the Function fixRelativeLinks with this code, the issue should be resolved. This uses the domino database path when generating links, rather than just a reference to the page you are on.
Private Function fixRelativeLinks (Byval txt As String) As String
'** convert relative links in <a> and <img> tags to
'** "pagename/$file/filename" format, so attached files and
'** images are referenced properly
Dim srcStart As String, srcEnd As String
srcStart = |<img src="|
srcEnd = |">|
fixRelativeLinks = ReplaceRangeEnds(txt, _
srcStart, srcEnd, _
srcStart & "/" & dbPath & "/pages/" & Me.Subject & "/$file/", srcEnd, "*[/]*", False)
Dim hrefStart As String, hrefEnd As String
hrefStart = |<a href="|
hrefEnd = |">|
fixRelativeLinks = ReplaceRangeEnds(fixRelativeLinks, _
hrefStart, hrefEnd, _
hrefStart & "/" & dbPath & "/pages/" & Me.Subject & "/$file/", hrefEnd, "*[/]*", False)
End Function
|
Feedback
Check out other projects