[opencms-dev] How to Create a navigation menu

mohamed hadj taieb mohamedhajjj at gmail.com
Mon Feb 19 14:08:09 CET 2007


I found the problem
it's the fact that i have'nt checked the "add to navigation " box
that's why it does nt write anything in the menu
it's too simple that i don't see it easily :)
thank u for trying helpin me
see u


2007/2/19, mohamed hadj taieb <mohamedhajjj at gmail.com>:
>
> Hi Kai Schliemann ,
> i think that the sites is correctly chosen and the proof of that is that
> when i add at the navigation.jsp
> "out.println("hello") "
> hello will be written when i display my page
> so i think that my page access to the content of the templates which
> contains the menu code but the problem is that no element from the folder is
> written!!
> if u have another idea about what should be the problem thank u for
> telling me it and if u need more explanation about the situation ask me
> whatever u want
> some other examples are also welcomed :)
>
>
> 2007/2/19, Kai Schliemann <schliemann at comundus.com>:
> >
> >  Hi,
> > check, if you chose the correct site in the site select box (e.g.
> > "sites/default").
> > Regards
> > Kai
> >
> > -----Ursprüngliche Nachricht-----
> > *Von:* opencms-dev-bounces at opencms.org [mailto:
> > opencms-dev-bounces at opencms.org]*Im Auftrag von *mohamed hadj taieb
> > *Gesendet:* Montag, 19. Februar 2007 11:31
> > *An:* The OpenCms mailing list
> > *Betreff:* [opencms-dev] How to Create a navigation menu
> >
> >  Hi i want to create a navigation menu with OpenCMS by using this code
> >
> > ########################### menu code ##########
> >
> > <%@ page session="false"
> >
> > import="java.util.Iterator,
> >
> > java.util.List,
> >
> > org.opencms.jsp.CmsJspNavBuilder,
> >
> > org.opencms.jsp.CmsJspNavElement,
> >
> > org.opencms.jsp.CmsJspActionElement"
> >
> > %>
> >
> > <%
> >
> > /*
> >
> > * Provides basic site navigation.
> >
> > */
> >
> > // Create the class from which we will get navigation.
> >
> > CmsJspActionElement cms =
> >
> > new CmsJspActionElement( pageContext, request, response );
> >
> > // Get navigation info
> >
> > CmsJspNavBuilder navigation = cms.getNavigation();
> >
> > List navItems = navigation.getNavigationForFolder();
> >
> > Iterator i = navItems.iterator();
> >
> > // Loop through all of the items in the ArrayList and print the
> >
> > // menu.
> >
> > while( i.hasNext() ) {
> >
> > CmsJspNavElement navElement = ( CmsJspNavElement )i.next();
> >
> > String link = cms.link( navElement.getResourceName() );
> >
> > String title = navElement.getTitle();
> >
> > out.println("»<a href=\"" + link + "\">" + title + "</a><br/>");
> >
> > }
> >
> > %>
> > ########################### end menu code ######
> >
> > when testing i dont get nothing in the content of the menu
> > i cheked the value of the bolean : i.hasnext() i found it false and i
> > don t understand why
> >
> > if someone have an idea about the problem or have an other example to
> > create a menu i will be grateful for his help
> >
> > Cordially
> > Mohamed HADJ TAIEB
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> > visit
> > http://lists.opencms.org/mailman/listinfo/opencms-dev
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20070219/394c395f/attachment.htm>


More information about the opencms-dev mailing list