[opencms-dev] How to use the cms navigation tag ?

Siegfried Ehret s.ehret at eurelis.com
Tue Jul 19 08:48:09 CEST 2011


Hi,

 

Thanks for your answer.

I think I messed up setting one general sitemap and 2 subsitemaps (one for each language).

I should setup only the sitemaps for languages.

Best regards.

 

Siegfried Ehret 

 

De : opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] De la part de Schliemann, Kai
Envoyé : jeudi 14 juillet 2011 09:07
À : The OpenCms mailing list
Objet : Re: [opencms-dev] How to use the cms navigation tag ?

 

Hi Siegfried,

I haven't used the tag yet, but I would guess, that you have to set startLevel to 1 and endLevel to 1+n (n being the number of levels you want to show in your navigation).

HTH

 

Best regards

_________________________________________

   

Kai Schliemann

Senior IT-Berater

    

comundus GmbH

Schüttelgrabenring 3, D-71332 Waiblingen

Telefon +49 7151-50028-0

E-Mail k.schliemann at comundus.com 

Internet www.comundus.com <http://www.comundus.com/> 

 

Geschäftsführer Klaus Hillemeier  

Amtsgericht Stuttgart, HRB 264290

         

comundus ist ein Unternehmen der IT EXCELLENCE Group

_________________________________________

 

  <http://www.facebook.com/pages/Comundus-GmbH/163398933697079> Finden Sie uns auf Facebook <http://www.facebook.com/pages/Comundus-GmbH/163398933697079> 

 

 

 

Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Siegfried Ehret
Gesendet: Mittwoch, 13. Juli 2011 18:57
An: opencms-dev at opencms.org
Betreff: [opencms-dev] How to use the cms navigation tag ?

 

Hi all,

 

I have 2 languages under 2 folders :

·         /fr (added in the navigation under « fr »)

·         /en (added in the navigation under « en »)

 

In each language folder, I have a tree of files.

When I am under /fr, I want a navigation with only the /fr tree, and when I am under /en, I want a navigation with only the /en tree.

 

I can't make it work.

 

If I do the following :

<cms:navigation type="forSite" startLevel="0" endLevel="1" var="nav"/>

<ul>

  <c:forEach items="${nav.items}" var="elem">

    <li>${elem.navText}</li>

  </c:forEach>

</ul>

 

I got fr and en as result.

 

I also tried to use the resource parameter but I got no result.

Seems like the resource parameter is not used.

 

Anyone here with a good idea ?

 

Last remark :

I looked at the CmsJspNavigationBean.java file, and I saw this :

case forSite:

  if (m_resource == null) {

      m_items = m_builder.getSiteNavigation();

  } else {

      m_items = m_builder.getSiteNavigation(m_resource, m_startLevel);

  }

  break;

 

In CmsJspNavBuilder.java, the getSiteNavigation function is like this :

public List<CmsJspNavElement> getSiteNavigation(String folder, int endLevel) { ... }

 

There is something strange between the names of the level parameters.

 

Thanks in advance.

 

Siegfried Ehret

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110719/905cc19d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 725 bytes
Desc: image001.jpg
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110719/905cc19d/attachment.jpg>


More information about the opencms-dev mailing list