How do I add an avatar to the public avatar library?
getSiteNavigation does not work. Why????
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > Content Management System > getSiteNavigation does not work. Why???? 27 October 2009 18:07:52

  Top users: 
  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:

getSiteNavigation does not work. Why????

Jesus Rodriguez 18 November 2004 13:24:51
 Hi, I am trying to generate a menu navigation tree with all the pages of
my website. I have typed the following code for that purpose:

<%@ page import="org.opencms­.jsp.*" %>
<%
// Create a JSP action element
CmsJspActionElement­ cms = new CmsJspActionElement­(pageContext,
request, response);

// List of all pages / subfolders (sorted by NavPos property)
java.util.List list = cms.getNavigation()­.getSiteNavigation()­;
java.util.Iterator i = list.iterator();

// Now build the navigation

while (i.hasNext()) {
CmsJspNavElement ne = (CmsJspNavElement)i­.next();
out.println("<a href=\"" + cms.link(ne.getReso­urceName()) +
"\">" + ne.getNavText() + "</a>");
out.println(ne.getN­avTreeLevel());
if (i.hasNext()) {
out.println("<br>")­;
}
}
%>

The result it is only a blank screen. Why? I have tried to use the
getNavigationTreeFo­rFolder method whith the correct parameters of levels
given by the getNavTreeLevel method and I have got only a list of the
folders in the current level. I can't achieve to display the items of
lower levels.

Would anybody help me? Thanks

JR


___________________­____________________­________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms­.org/mailman/listinf­o/opencms-dev

Add comment
Jesus Rodriguez 18 November 2004 14:34:24 permanent link ]
 Hi all again. I have just tested that the code that I posted before
works OK on OpenCms version 5, but does NOT WORK on OpenCms version 6
alpha2.


___________________­____________________­________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms­.org/mailman/listinf­o/opencms-dev

Add comment
Waehrisch & Feykes GmbH Hartmann 18 November 2004 14:50:46 permanent link ]
 When you call your page you have to switch to the site it is in. I.e. if
your page ist /sites/default/inde­x.html you have to switch to
/sites/default/. It won't work while you are in site /. Alternatively you
can move your pages to site / during development.

Regards,
Stephan

----- Original Message -----
From: "Jesus Rodriguez" <rodpemail-opencms@­yahoo.es>
To: <opencms-dev@opencm­s.org>
Sent: Thursday, November 18, 2004 12:34 PM
Subject: [opencms-dev] getSiteNavigation does not work. Why????

Hi all again. I have just tested that the code that I posted before> works OK on OpenCms version 5, but does NOT WORK on OpenCms version 6> alpha2.>
___________________­____________________­________> This mail is send to you from the opencms-dev mailing list> To change your list options, or to unsubscribe from the list, please visit> http://mail.opencms­.org/mailman/listinf­o/opencms-dev>



___________________­____________________­________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms­.org/mailman/listinf­o/opencms-dev

Add comment
Joachim Arrasz 18 November 2004 14:52:40 permanent link ]
 Hi,
Hi all again. I have just tested that the code that I posted before > works OK on OpenCms version 5, but does NOT WORK on OpenCms version 6 > alpha2.


you should change from com.opencms.* to org.opencms.*

Maybe there are also some little modifications needed for methods you
use ...

Hope this helps

Bye Achim


___________________­____________________­________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms­.org/mailman/listinf­o/opencms-dev

Add comment
Jesus Rodriguez 18 November 2004 15:24:05 permanent link ]
 Thank you very much Stephan, now it works. I was runnig the code from
"/" site. Once I have changed to my own site it works ok

Thanks again

Regards,
JesГєs.


___________________­____________________­________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms­.org/mailman/listinf­o/opencms-dev

Add comment
Guest 24 September 2007 06:17:36 permanent link ]
 hi friends(Jesєs and Stephan) , thanks you soooooooooooooooooo­ooooooooooooooooo...­....................­......... mcuhhhhhhhhhhhhhhhh­hhhhhhhhhhhhhhhhhh i was also strugling so... much and i got it ...


Regards,
Sham

Add comment
Guest 27 October 2009 18:07:52 permanent link ]
 I am having trouble still. Do you think you could please post your final code that you got working?
Thanks in advance.

Evan
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > Content Management System > getSiteNavigation does not work. Why???? 27 October 2009 18:07:52

see also:
javax.management location in 3.0.4
ejb tier security
deploying in tomcat/jboss
pass tests:
see also:
Share the way to rip DVD and convert…
Hy!!!
...

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .