From user-return-2418-apmail-forrest-user-archive=forrest.apache.org@forrest.apache.org Tue Jul 26 15:55:53 2005 Return-Path: Delivered-To: apmail-forrest-user-archive@www.apache.org Received: (qmail 82913 invoked from network); 26 Jul 2005 15:55:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jul 2005 15:55:53 -0000 Received: (qmail 16708 invoked by uid 500); 26 Jul 2005 15:55:52 -0000 Delivered-To: apmail-forrest-user-archive@forrest.apache.org Received: (qmail 16625 invoked by uid 500); 26 Jul 2005 15:55:51 -0000 Mailing-List: contact user-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@forrest.apache.org List-Id: Delivered-To: mailing list user@forrest.apache.org Received: (qmail 16510 invoked by uid 99); 26 Jul 2005 15:55:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 08:55:50 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [217.199.181.91] (HELO ns3.wkwyw.net) (217.199.181.91) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 26 Jul 2005 08:55:43 -0700 Received: (qmail 19207 invoked from network); 26 Jul 2005 15:55:52 -0000 Received: from 82-69-78-226.dsl.in-addr.zen.co.uk (HELO ?192.168.0.4?) (82.69.78.226) by ns3.wkwyw.net with SMTP; 26 Jul 2005 15:55:52 -0000 Message-ID: <42E65CFD.4070009@apache.org> Date: Tue, 26 Jul 2005 16:55:41 +0100 From: Ross Gardler User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: user@forrest.apache.org Subject: Re: Problem with site.xml and menu for hidden items References: <42D2AE98.7070808@erlang-fr.org> <20050711224925.GA27209@igg.indexgeo.com.au> <42DE6218.7050602@erlang-fr.org> <20050721144212.GA1246@igpb.indexgeo.com> <42E6195A.7080701@erlang-fr.org> <42E61BB6.40708@apache.org> <42E62DFE.8010408@erlang-fr.org> In-Reply-To: <42E62DFE.8010408@erlang-fr.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Mickael Remond wrote: > Ross Gardler wrote: > >> I missed the first part of this thread. Can you please explain why you >> want to have items in your navigation tree with no label, it seems >> kind of useless since no one will be able to see the navigation link >> and therefore will not be able to use it. > > > I would like to avoid generating very long or very deep menu, that's why > I would like to hide menu elements. The links to those documents are not > included in the menu, but directly inside some of the documents managed > by the site. > So why include those document inside the site.xml file should you ask ? > Because, that's the only way I found to have the menu render properly. > If you load a file which is not defined in the site.xml, then the > complete menu is shown and not only the relevant sublevel. OK, I get it. Your approach is not the way to do this as it creates an additional maintenance overhead in site.xml (there is no need to reference those files there). Furthermore, The skin expects to highlight the currently selected page in the menu. If you have it hidden then the skin is not able to do that. > An illustration of the problem can for example be tested here: > http://www.process-one.net/en/projects/ejabberd/releases/index.html > This document content two sublevels documents that I would like to keep > hidden in the menu. However, if you click on one of them, the complete > menu for all the site is shown. What do you expect the menu system to show when one of your hidden pages is shown? I suppose the higher level menu item, but that seems a little counter intuitive since the menu will highlight content that is not actually vissible. It would be possible to hack the skin so that the higher level menu is displayed. The bit you are interested in is: in main/webapp/skins/common/xslt/html/book2menu.xsl This code compares the node-path in the site.xml file with the path to the current file. I guess you need to add a new in there. Something like this (note this is just an idea, I have not tested, nor fully considered the implications): Let us know if you get anywhere, a patch would be welcome if you make this work. Ross