It is a good step. It is still not optimal. There is still a big problem. It
should not happen often, but sometimes it does (at least for me). Or you do not
allow it because the system you are using is not flexible enough.
What if the client/user wants to move a page or even worse, a folder. You have
all these hard coded links everywhere that need to be changed.
The page located at /f1/f2/page.html was moved for some reason
needs to be switched to
Someone or thing needs to go back in and change all those links. This is
If links were able to get their href from a page/resource UID referenced in the
link, and build the path at page generation time (or whenever) then this would
not be a problem.
> -----Original Message-----
> From: Bert Van Kets [mailto:email@example.com]
> Sent: Wednesday, September 11, 2002 6:11 AM
> To: firstname.lastname@example.org
> Subject: Re: [PATCH] fix tabs
> Great solution!
> Wish I thought of this a long time ago.
> Congrats Jef!
> Thanks Konstantin for implementing this.
> At 16:52 10/09/2002 +1000, you wrote:
> >This patch fixes tabs on Forrest-based websites. In the current
> >tab2menu.xsl, there is a hardcoded '/forrest' context path:
> >Which a) makes tab2menu.xsl unusable for non-Forrest sites, and b) forces
> >the Forrest context to be '/forrest'. Also because it's trying to be
> >server-relative, the links are broken on static local docs: they appear
> >as file:///forrest/community/howto/index.html
> >My fix is to make the generated link relative. As the link must be
> >relative to the current directory, I've written an XSL, dotdots.xsl,
> >which returns the appropriate number of ../'s to negate the current tab's
> >directories. From the file's description. Here's the examples:
> > Input Output
> > index.html ""
> > dir/index.html "../"
> > dir/subdir/index.html "../../"
> > dir//index.html "../"
> > dir/ "../"
> > dir// "../"
> > \some\windows\path "../../"
> > \some\windows\path\ "../../../"
> > \Program Files\mydir "../"
> >Anyway, it's used in tab2menu.xsl to work out the correct links for
> >non-selected tabs. So if the user is in community/howto/index.html, the
> >'Home' link goes to ../../
> >I have also modified the sitemap to allow linking to directories. Links
> >to '**/' are now redirected to '**/index.html'. Without this, tabs were
> >broken in the live webapp, since each tab is a directory link. Statically
> >generated sites worked because (presumably) the crawler rewrites links to
> >'directory/' to 'directory/index.html'.
> >Also, previously directories in tabs.xml had to end in '/':
> >Now tab2menu.xsl adds a trailing '/' regardless, so it is no longer
> >required (although it won't hurt).
> >I've verified that offline generation works correctly with this patch.
> >The NPEs, broken links and zillion FOP error messages are not my fault ;)