[opencms-dev] problem in creating menus

Vikas Gupta vikas.gupta at daffodildb.com
Fri Aug 11 14:38:08 CEST 2006


Hi Christian,

   Thanks for your prompt reply. My question is not an HTML question. I am
using

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

to create dropdown menus. This creates menus for folder resides in
/sites/default/ folder, My question is very clear that how I can create this
for pages resides in my module.

-Vikas




On 8/11/06, Christian Steinert <christian_steinert at web.de> wrote:
>
> Vikas Gupta schrieb:
> > 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.
> >
> >
> >
> >    2. 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
> >
> >
>
> This is a Html question, not an opencms question.
>
> You should read sites like alistapart.com and search there for
> "dropdown" if you want to learn about menu-creation with
> HTML/CSS/Javascript.
>
> Christian
>
>
>
> _______________________________________________
> 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/20060811/6862a47a/attachment.htm>


More information about the opencms-dev mailing list