commit a5a410fb4715fa2b1999bf6e33e9fdc431ebd10a
parent 28058c5e4e0f1d6beba1d36d43df14f8f69d52de
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Thu, 17 Sep 2009 23:10:25 +0000
redirect up link for user-directory docs
svn: r16059
original commit: 062c56769b1a46f0db837cf30c573b5738861646
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss
@@ -190,7 +190,8 @@
(init-field [alt-paths null]
;; up-path is either a link "up", or #t which uses
;; goes to start page (using cookies to get to the
- ;; user start page)
+ ;; user start page). If it's a path, then it's also
+ ;; used for the "top" link on the page.
[up-path #f]
[script-path #f]
[script-file #f]
@@ -690,6 +691,7 @@
[(equal? x "index.html") (values x "the manual top")]
[(equal? x "../index.html") (values x "the documentation top")]
[(string? x) (values x #f)]
+ [(path? x) (values (url->string (path->url x)) #f)]
[else (error 'navigation "internal error ~e" x)]))
(define title*
(if (and tfrom (part? tfrom))
@@ -705,7 +707,9 @@
,@more)))))
(define top-link
(titled-url
- "up" "../index.html"
+ "up" (if (path? up-path)
+ (url->string (path->url up-path))
+ "../index.html")
`[onclick . ,(format "return GotoPLTRoot(\"~a\");" (version))]))
(define navleft
`(span ([class "navleft"])