Hi All,<br>
<br>
Here is complete details regarding my problem to create drop down menus. Please let me know if anyone have Idea<br>
<p class="MsoNormal"><b style=""><u><span style="text-decoration: underline;"><span style="font-weight: bold;"><br>
</span></span>Problem in
creating dynamic menu:</u></b></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">CMS:<span style=""> </span>OPENCMS
/ Version: 6.0.2</p>
<p class="MsoNormal">Database:<span style=""> </span>MYSQL
/ Version: 5.x</p>
<p class="MsoNormal">Server:<span style=""> </span>Tomcat
/ Version: 5.0</p>
<p class="MsoNormal">JDK:<span style=""> </span>1.5</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b style="">Scope of work:</b></p>
<p class="MsoNormal"><b style=""> </b></p>
<p class="MsoNormal"><b style=""><span style=""> </span></b>Create a dynamic menu on my template
page. Menu should be editable later.</p>
<p class="MsoNormal"><b style=""> </b></p>
<p class="MsoNormal"><b style=""> </b></p>
<p class="MsoNormal"><b style="">Queries:</b></p>
<p class="MsoNormal"><b style=""> </b></p>
<p class="MsoNormal"><b style="">How many ways are
there to create a dynamic menu which should be editable?</b></p>
<p class="MsoNormal"><b style=""> </b></p>
<p class="MsoNormal"><b style=""> </b></p>
<p class="MsoNormal"><b style="">My approach:</b></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">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:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">/* This code is a part of my template */</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style=""> </span><tr
align="right"></p>
<p class="MsoNormal"><span style=""> </span><td
width="114"
style="background-color:#525252;height=36px;"> </td></p>
<p class="MsoNormal"><span style=""> </span><td
style="background-color:#FFFFFF; height:195px;"></p>
<p class="MsoNormal"><span style=""> </span><%<span style=""> </span></p>
<p class="MsoNormal"><span style="">
</span>cms.include("../elements/nav_head.jsp", null,
cms.getProperties()); </p>
<p class="MsoNormal"><span style=""> </span>%></p>
<p class="MsoNormal"><span style=""> </span></td></p>
<p class="MsoNormal"><span style=""> </span><td
width="115"
style="background-color:#525252;height=36px;"> </td></p>
<p class="MsoNormal"><span style=""> </span></tr></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">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:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">/* This code is a part of nav_head.jsp */</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">CmsTemplateNavigation cms = new
CmsTemplateNavigation(pageContext, request, response);</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">// set the default property value to create head navigation
menu items</p>
<p class="MsoNormal">// true: all folders and files without the property
"style_head_nav_showitem" explicitly set will be shown in head
navigation menu</p>
<p class="MsoNormal">// false: no folder or file without the property
"style_head_nav_showitem" explicitly set will be shown in head
navigation menu</p>
<p class="MsoNormal">cms.setHeadNavItemDefaultValue(true);</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">out.print(cms.buildNavigationHead(cms.key("link.home"),
"navtop", "navspacer"));</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This creates a menu with following problems:</p>
<p class="MsoNormal"> </p>
<ol style="margin-top: 0in;" start="1" type="1">
<li class="MsoNormal" style="">At
first request, Menu is not displaying. While copying url and run the page
on another browser, It is displaying.</li>
</ol>
<p class="MsoNormal"> </p>
<ol style="margin-top: 0in;" start="2" type="1">
<li class="MsoNormal" style="">Menu
items are the folder and pages of located at /sites/default/ and
startFolder is always root ( / ). </li>
</ol>
<p class="MsoNormal" style="margin-left: 0.25in;"> </p>
<p class="MsoNormal" style="margin-left: 0.25in;"><span style=""> </span>How
can I change this startFolder to my folder?<span style=""> </span><span style=""> </span></p>
<p class="MsoNormal" style="margin-left: 0.25in;"><span style=""> </span>How can I add pages that exist in my
module?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">One more thing I want to know. I need to add images or some
style to my main menu bar. Is it possible?<br>
</p>
<p class="MsoNormal"><br>
Thanks & Regards<br>
Vikas Gupta<br>
</p>