forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: suppressing index.html
Date Wed, 05 Mar 2003 03:46:49 GMT
On Tue, Mar 04, 2003 at 10:39:00PM -0400, Sergey Missan wrote:
> Hello,
> 
> I was playing a bit more with Forrest and tried to suppress generation
> of .../index.html links in menus (but still keeping them in site.xml).

I'm not sure what you're trying to do.  Do you want to completely exclude
.../index.html links, or just trim off the 'index.html' bit?

> I've changed the code in skins/common/book2menu.xsl to:
> 
>   <xsl:template name="unselected">
>   <xsl:choose>
>    <xsl:when test="contains(@href,'index.html')">
>     <xsl:variable name="dir">
>       <xsl:call-template name="dirname">
>         <xsl:with-param name="path" select="@href"/>
>       </xsl:call-template>
>     </xsl:variable>
>      <a href="{$dir}"><xsl:value-of select="@label"/></a>
>    </xsl:when>
>    <xsl:otherwise>
>      <a href="{@href}"><xsl:value-of select="@label"/></a>
>    </xsl:otherwise>
>   </xsl:choose>
>   </xsl:template>
> 
> and this stopped forrest from generating my files containing index.html
> in their names! My understanding was that book2menu.xsl takes site.xml
> or book.xml as a source and generates the navigational stuff. Now it
> looks like it has a mind of its own?

The way Forrest works is:

 - Render a page, eg index.html
 - Request links for that page, eg index.html?cocoon-view=links
 - For each link, recursively render, chase links, etc.

So if the menu doesn't point to foo/index.html, and it isn't referenced
in the body of any page, then it is assumed un-get-to-able and won't be
rendered.  Perhaps this is the problem?  What are you trying to achieve
by stripping off index.html, but still requiring those pages?

Also, perhaps this will help:
 
http://xml.apache.org/forrest/faq.html#index.html


--Jeff


> -- Sergey
> 
> 

Mime
View raw message