Re: Problem with site.xml and menu for hidden items

2005-07-29 Thread Mickael Remond

David Crossley wrote:

Wait, you missed something. I sent another reply
directly after that correcting my obvious error.


Yes. I missed it. Thank you for pointing the problem. I found the 
missing mail in the web archives.


However, this does not solve the problem. Every files are generated, but 
when I access the hidden sublevel, the whole menu is shown.


I will try investigate template modification as Ross Gardler suggests.

Thank you !

--
Mickaël Rémond


Re: Problem with site.xml and menu for hidden items

2005-07-29 Thread Mickael Remond

Ross Gardler wrote:
Let us know if you get anywhere, a patch would be welcome if you make 
this work.


Hello again,

Here is how I solved the problem. This is not a perfectly clean hack but 
it works for me ;-)

I used this piece of site.xml code:
  release type=leaf label=Release notes href=releases/
   description=Latest release notes
index type=hidden label=Release notes href=index.html/
release2 type=hidden label=Release 0.9.1
  href=release_0.9.1.html/
release1 type=hidden label=Release 0.9
  href=release_0.9.html/
  /release

The hidden element are properly placed in the site hierarchy, whereas 
element with no label are ignored.
Then I use the type tag to force the rendering of elements that would be 
considered as menu to menu-item (clickable). The element is thus render 
as a leaf, while having children element (all are hidden).


And I had to modify the file 
/src/core/context/resources/stylesheets/site2book.xsl to:


  xsl:template match=*/*
xsl:choose
  !-- No label, abandon the whole subtree --
  xsl:when test=not(@label)
  /xsl:when
  !-- Below here, everything has a label, and is therefore 
considered for display --


  !-- No children - must be a menu item --
  !-- Has children, but they are not for display - menu item --
  xsl:when test=count(*) = 0 or count(*)  0 and (not(*/@label))
menu-item
  xsl:copy-of select=@*/
/menu-item
  /xsl:when
  xsl:when test=@type='leaf'
 menu-item
xsl:copy-of select=@*/
 /menu-item
  /xsl:when
  !-- Anything else is considered a menu --
  xsl:otherwise
menu
  xsl:copy-of select=@*/
  xsl:apply-templates/
/menu
  /xsl:otherwise
/xsl:choose
  /xsl:template

I have only added the leaf test, in this piece of code.

On problem remains, that I will solve later: The forced leaf element is 
not rendered as selected when I select it directly. It should not be 
hightlighted when a hidden child is selected however.

An example result is here:
http://www.process-one.net/en/projects/ejabberd/releases/release_0.9.1.html

I will fix that after the vacation break.

Thank you all for your help.

--
Mickaël Rémond
 http://www.3pblog.net/


Re: Problem with site.xml and menu for hidden items

2005-07-21 Thread David Crossley
Mickael Remond wrote:
 David Crossley wrote:
 If you still have trouble, then create an issue in our Issue Tracker
 and attach a screenshot to help explain your problem.
 
 The problem can be demonstrated online. For exemple, here is a normal 
 page that show the correct menu:
 http://www.process-one.net/en/projects/ejabberd/releases/index.html
 
 If you click on one of the link on the page you reach the following 
 page, that display all menu entries in every topic/tab.
 http://www.process-one.net/en/projects/ejabberd/releases/release_0.9.1.html
 
 The corresponding piece of site.xml is something like:
   release label=Release notes href=releases/index.html 
 
description=Latest release notes
 index href=releases/index.html/
 release2 href=releases/release_0.9.1.html/
 release1 href=releases/release_0.9.html/
   /release

As well as the reference that Diwaker provided, also look
at the forrest/site-author for our site.xml
e.g. the tools section. Something like this might
do the trick ...
  release label=Release notes href=releases/ 
 description=Latest release notes
index href=index.html/
release2 href=release_0.9.1.html/
release1 href=release_0.9.html/
  /release

David

 My question is the following: How is it possible to hide link under a 
 certain level while keeping a proper rendering of the menu ? Is it 
 possible ?
 
 Thank you in advance.
 
 -- 
 Micka?l R?mond


Re: Problem with site.xml and menu for hidden items

2005-07-21 Thread David Crossley
David Crossley wrote:
 Mickael Remond wrote:
  David Crossley wrote:
  If you still have trouble, then create an issue in our Issue Tracker
  and attach a screenshot to help explain your problem.
  
  The problem can be demonstrated online. For exemple, here is a normal 
  page that show the correct menu:
  http://www.process-one.net/en/projects/ejabberd/releases/index.html
  
  If you click on one of the link on the page you reach the following 
  page, that display all menu entries in every topic/tab.
  http://www.process-one.net/en/projects/ejabberd/releases/release_0.9.1.html
  
  The corresponding piece of site.xml is something like:
release label=Release notes href=releases/index.html 
  
 description=Latest release notes
  index href=releases/index.html/
  release2 href=releases/release_0.9.1.html/
  release1 href=releases/release_0.9.html/
/release
 
 As well as the reference that Diwaker provided, also look
 at the forrest/site-author for our site.xml
 e.g. the tools section. Something like this might
 do the trick ...
   release label=Release notes href=releases/ 
  description=Latest release notes
 index href=index.html/
 release2 href=release_0.9.1.html/
 release1 href=release_0.9.html/
   /release

Oops, i misunderstood your issue. Would this do it? ...

  release label=Release notes href=releases/index.html 
 description=Latest release notes/
  release2 href=releases/release_0.9.1.html/
  release1 href=releases/release_0.9.html/

David


Re: Problem with site.xml and menu for hidden items

2005-07-20 Thread Diwaker Gupta
On Wednesday 20 July 2005 7:39 am, Mickael Remond wrote:
 My question is the following: How is it possible to hide link under a
 certain level while keeping a proper rendering of the menu ? Is it
 possible ?

The menu generation is a function of how your site.xml and tabs.xml are 
structured. See:
http://forrest.apache.org/docs_0_70/linking.html#menu_generation

Diwaker
-- 
Web/Blog/Gallery: http://floatingsun.net


pgpbyddeSgt3G.pgp
Description: PGP signature