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

Siegfried Ehret s.ehret at eurelis.com
Wed Jul 13 18:57:05 CEST 2011


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/20110713/5600f3da/attachment.htm>


More information about the opencms-dev mailing list