From 062c56769b1a46f0db837cf30c573b5738861646 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 17 Sep 2009 23:10:25 +0000 Subject: [PATCH] redirect up link for user-directory docs svn: r16059 --- collects/scribble/html-render.ss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss index ff77cf5991..a8db37f6d7 100644 --- 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"])