Hi Solprovider, hi all,

[EMAIL PROTECTED] wrote:
On 12/6/05, Annie Dumont <[EMAIL PROTECTED]> wrote:
  
 By using the site-tab of lenya, you can set a part of the sitetree to
"hidden" (Edition/Change node visibility).
In the sitetree.xml it corresponds to a parameter "visibleinnav" set to
"false".
But, the part of sitree i want to hide in the left menu is still visible.
Is there something to write elsewhere for this settings to run correctly ?
My lenya version is 1.2.3 and cocoon is 2.1.7
 It is in the live view (after publishing what was set in the authoring
side) that the part of sitetree is not hidden, though in live sitetree.xml
the parameter visibleinnav is set to "false".
    

Try clearing the caches:
1. Delete everything in  {pub}/work/cache/live
  
Sorry, i don't have any {pub}/work/cache/ at all. Is this a mistake ?
Under work, i only have a search/  directory for lucene.
2. Restart Lenya.

If #1 fixes it, then the cache is not noticing changing sitetree.xml
requires it to rebuild all pages using the menus.
If #2 fixes it, then sitetree.xml is not being reloaded after the change.
If neither fixes it, then there is probably a bug.  Did you customize menu.xsl?
  
2. does not fix it. So it's a bug ?
I put the menu xsl in attachment, but it is not very pretty : there are still some old settings in comment ...

Cheers, annie
<?xml version="1.0" encoding="UTF-8" ?>
<!--
  Copyright 1999-2004 The Apache Software Foundation

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<!-- $Id: menu.xsl,v 1.15 2004/03/13 12:42:05 gregor Exp $ -->

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0";
    xmlns="http://www.w3.org/1999/xhtml";
    exclude-result-prefixes="nav"
    >
    

<xsl:template match="nav:site">
  <div id="menu">
    <xsl:apply-templates select="nav:node"/>
	  <!--div class="menublock-1">
	  	<div class="menuitem-1">
	  		<a href="http://bu.univ-reunion.fr/";>Bibliotheque</a>
		</div>
          </div>
	  <div class="menublock-1">
	  	<div class="menuitem-1">
	  		<a href="http://wapps.univ-reunion.fr/annu";>Annuaire</a>
		</div>
          </div>
	  <div class="menublock-1">
	  	<div class="menuitem-1">
	  		<a href="http://intranet.univ-reunion.fr/";>Intranet</a>
		</div>
      </div-->
  </div>
</xsl:template>

<!--
<xsl:template match="nav:node">
  <xsl:choose>
    <xsl:when test="descendant-or-self::nav:[EMAIL PROTECTED] = 'true']">
      <div class="menublock-selected-{count(ancestor-or-self::nav:node)}">
        <xsl:call-template name="item"/>
        <xsl:apply-templates select="nav:node"/>
      </div>
    </xsl:when>
    <xsl:otherwise>
      <div class="menublock-{count(ancestor-or-self::nav:node)}">
        <xsl:call-template name="item"/>
        <xsl:apply-templates select="nav:node"/>
      </div>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
-->
<xsl:template match="nav:node">
  <xsl:choose>
    <xsl:when test="descendant-or-self::nav:[EMAIL PROTECTED] = 'true']">
      <div class="menublock-selected-{count(ancestor-or-self::nav:node)}" in-path="true">
        <xsl:call-template name="item"/>
        <xsl:apply-templates select="nav:node"/>
      </div>
    </xsl:when>
    <xsl:otherwise>
      <div class="menublock-{count(ancestor-or-self::nav:node)}">
      <xsl:if test="../@current = 'true' or count(ancestor-or-self::nav:node)!=4">
        	<xsl:call-template name="item"/>
        	<xsl:apply-templates select="nav:node"/>
	</xsl:if>
      </div>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<xsl:template name="item">
    <xsl:choose>
      <xsl:when test="@current = 'true'">
        <xsl:attribute name="current">true</xsl:attribute>
        <xsl:call-template name="item-selected"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="item-default"/>
      </xsl:otherwise>
    </xsl:choose>
</xsl:template>


<xsl:template name="item-default">
  <div class="menuitem-{count(ancestor-or-self::nav:node)}">
    <a href="[EMAIL PROTECTED]">
    	<!--xsl:if test="count(ancestor-or-self::nav:node)=3"></xsl:if-->
	<!--xsl:if test="count(ancestor-or-self::nav:node)=2">- </xsl:if-->
	<xsl:apply-templates select="nav:label"/>
   </a>
  </div>
</xsl:template>
    
    
<xsl:template name="item-selected">
  <div class="menuitem-selected-{count(ancestor-or-self::nav:node)}">
    <a href="[EMAIL PROTECTED]">
    <!--xsl:if test="count(ancestor-or-self::nav:node)=3"></xsl:if-->
    <!--xsl:if test="count(ancestor-or-self::nav:node)=2">- </xsl:if-->
    <xsl:apply-templates select="nav:label"/>
    </a>
  </div>
</xsl:template>


<xsl:template match="nav:label">
  <xsl:value-of select="."/>
</xsl:template>
    
    
<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>


</xsl:stylesheet> 

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

Reply via email to