On 6/15/05, Johnny Jones <[EMAIL PROTECTED]> wrote:
>    Currently I am trying to implement two different menus to display
> documents instead of the same menu everytime.  One of the method I was
> trying to do was going inside pub/lenya/xslt/navigation/menu.xsl,
> and in there, I copy and paste the code for the old menu and rename it as
> follow:
>   <div id="menu2">
>     <table width="100%" border="0" cellpadding="0" cellspacing="5"
> background="/lenya/unizh/authoring/images/TACb_lfbg_192x400.gif"
> height="400">
> <xsl:apply-templates name="nav:node"/>
> <tr><td height="100%"></td></tr>
> </table>
>   </div>

Issue #1: You are mixing function and form.  menu.xsl is meant to
transform the sitemap into a data structure of DIVs.  Use later XSL
(page2xhtml.xsl) with CSS to add formatting such as a TABLE.

> The problem that I am having is that whenever I call the original menu or
> the new menu ( menu2 ), this code always being applied:
> 
> <xsl:template match="nav:node
> [          not(ancestor-or-self::nav:[EMAIL PROTECTED] = 'true']) and
>            not(descendant-or-self::nav:[EMAIL PROTECTED] = 'true']) and
>            not(..//nav:[EMAIL PROTECTED] = 'true'])
> ]"/>
> This means that the current page sibblings and descending are being display.
>   However, I want the option to be able to
> display all of the page being created.  This means I need to find a way to
> overide the above rule for each new menu I created.  Can you give me some
> advice on any techniques I can try so that each
> menu I created will have a unique rule associated with it?   I have tried
> many different ways to get around with the problem I mentioned above, but so
> far it all failed.  My biggest obtacles is tha
> t I cannot declare the exclude-result-prefixes="nav" twice, so I cannot
> match up two different rule for the two menu.

Issue #2: If you want a new navigation control, create a new
navigation control.  Do not try to overload an existing control. 
Rather than copy paste inside menu.xsl, copy menu.xsl to menu2.xsl. 
Change menu2.xsl to fit your needs, and add menu2.xsl to your
pipeline.  That was how I created map.xsl, then I rewrote much of it.

> I also tried other suggestion that I recieved from the mailing list.  I
> followed some advice by visiting http://solprovider.com/lenya/ and read
> everything about Sitemaps, Usecase Sitemaps, and Website Map.  

It sounds like I did not explain everything well.  I just added a few
notes.  Let me know if anything else is not understandable.

> I then tried to follow the direction to build a map of all the
> pages in my publication, but I kept getting the following error whenever I
> click on the link to go to the map:
> org.apache.cocoon.ResourceNotFoundException: No pipeline matched request:
> ActingClasses/authoring/table.html
> cause: org.apache.cocoon.ResourceNotFoundException: No pipeline matched
> request: ActingClasses/authoring/table.html

Issue #3: Something is wrong.  This probably was caused by the HTML in menu.xsl.

> It seems to me that lenya have a hard time Usecase Sitemaps, but I am not so
> sure if that is really the cause.  

Usecases work great.  Most functionality belongs in Usecases.  The
whole CMS could/should have been implemented as Usecases (which would
remove the authoring/live "areas".)  Usecases are getting an overhaul
for Lenya 1.4; I have no idea what has changed, but hopefully they
will become even more useful.

> I also notice from the online
> direction, one of the step said "To add a link to the
> map to your XSL, use:
> <A HREF="{$url}?lenya.usecase=map"><i18n:text>Sitemap</i18n:text></A>".  I
> am not sure what should be in place of {$url}, so I just give the url of the
> current page that has the link to the map.

Bad documentation.  I use {pub} in directory names to mean replace
with your publication directory.  {$url} is an XSL variable.  The
pipeline should pass the url as a parameter to the XSL.  The XSL
should have an xsl:param near the top.  The variable will be replaced
by the XSL engine; it is not meant to be replaced manually.

---
Start over.
1. Restore the original menu.xsl.
2. Make a copy of the file and call it menu2.xsl.
3. Change the DIV to:
  <div class="menu2" id="menu2">
4. Change the rest to produce what you want.
5. Add menu2.xsl to your pipeline.  (Just copy the navigation/menu line.)
6. Add this line to your page2xhtml.xsl:
   <xsl:apply-templates select="xhtml:[EMAIL PROTECTED] = 'menu2']"/>
7. See what you get.  Then keep fixing the XSL and CSS until it does
what you want.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to