lenya-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Re: Checking current page
Date Fri, 20 Aug 2004 07:49:16 GMT
Jonathan Linczak wrote:
> Hi all,
> 
> I seem to be at a loss here, and I know it's something simple.  I'm 
> creating a pipeline for a design specific to one directory.  I created 
> my own menu XSL files to display the menu I need in the way that I 
> understand it, but it doesn't find the document that is current.  For 
> example, if I create a pipeline with a match like this:
> 
> <map:match pattern="lenyabody-*/*/*/*/menssports/*.html">
> 
> and create my custom menu.xsl file thusly:
> 
> <xsl:for-each select="//nav:node">
>   Not chosen
>   <xsl:if test="@current = 'true'">
>     Chosen
>   </xsl:if>
> </xsl:for-each>
> 
> I get everything "Not chosen".  But, if I create a pipeline with a match 
> like this:
> 
> <map:match pattern="lenyabody-*/*/*/*/*">
> 
> and keep the same custom menu.xsl file as above, it always gets it right 
> and finds the current document.  I think I must be missing something in 
> my first pipeline, and I have this feeling it is a value I need to 
> change in the <map:transform> part of the pipeline, but everything that 
> is intuitive to me doesn't seem to be working.  Can someone point me in 
> the right direction?  It's one of my final snags before the launch of 
> the site.  Thanks!

Apparently your current node doesn't get marked by the navigation
framework.

Some tips for debugging this:

- Learn about how the current node is marked. This happens in
   sitetree2nav.xsl. You have to pass the correct URL to the navigation
   framework.

- For debugging, display the navigation element in its different stages.
   You might want to setup some Cocoon views for this, or just disable
   the subsequent transformations (early pipeline exit using an XML
   serializer).

- Add the parameters which are passed to sitetree2nav as attributes to
   <nav:site> and compare them with the ones which are passed when
   everything works.

HTH,
-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Mime
View raw message