[opencms-dev] problem in creating menus

Vikas Gupta vikas.gupta at daffodildb.com
Fri Aug 11 13:10:23 CEST 2006


Hi All,

  Here is complete details regarding my problem to create drop down menus.
Please let me know if anyone have Idea

*
Problem in creating dynamic menu:*



CMS:               OPENCMS / Version: 6.0.2

Database:         MYSQL / Version: 5.x

Server:             Tomcat / Version: 5.0

JDK:                1.5





*Scope of work:*

* *

*    *Create a dynamic menu on my template page. Menu should be editable
later.

* *

* *

*Queries:*

* *

*How many ways are there to create a dynamic menu which should be editable?*

* *

* *

*My approach:*



I have created a module in opencms. Than I have created a jsp template in
templates folder. Code that I am using to include a page for navigation is:



/* This code is a part of my template */



 <tr align="right">

    <td width="114"
style="background-color:#525252;height=36px;"> </td>

    <td style="background-color:#FFFFFF; height:195px;">

   <%

    cms.include("../elements/nav_head.jsp", null, cms.getProperties());

   %>

    </td>

    <td width="115"
style="background-color:#525252;height=36px;"> </td>

   </tr>





In this template I have created a row which includes nav_head.jsp file and
the code of nav_head.jsp file which I have written is:





/* This code is a part of nav_head.jsp */



CmsTemplateNavigation cms = new CmsTemplateNavigation(pageContext, request,
response);



// set the default property value to create head navigation menu items

// true: all folders and files without the property
"style_head_nav_showitem" explicitly set will be shown in head navigation
menu

// false: no folder or file without the property "style_head_nav_showitem"
explicitly set will be shown in head navigation menu

cms.setHeadNavItemDefaultValue(true);



out.print(cms.buildNavigationHead(cms.key("link.home"), "navtop",
"navspacer"));







This creates a menu with following problems:



   1. At first request, Menu is not displaying. While copying url and run
   the page on another browser, It is displaying.



   1. Menu items are the folder and pages of located at /sites/default/
   and startFolder is always root ( / ).



      How can I change this startFolder to my folder?

      How can I add pages that exist in my module?





One more thing I want to know. I need to add images or some style to my main
menu bar. Is it possible?


Thanks & Regards
Vikas Gupta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060811/6e0b229f/attachment.htm>


More information about the opencms-dev mailing list