[opencms-dev] To create a JSP Template Development based on some parameters

Thomas Maerz thomasmaerz at gmx.de
Wed Jan 5 22:40:40 CET 2005


Chitra Prasad <chitrap at andale.com> writes:

> e.g If one of the main product category is Books, the image shown is
> books.gif, where when this tab is selected then the image shown is
> books_selected.gif. Further under books, the second level of category is
> Fiction, then the main navigation shows books_seleted.gif and fiction.gif.
> If the fiction tab is selected, then the images to be displayed
> arebooks_selected.gif and fiction_selected.gif. Further to the fiction
> category being selected, the third level of navigation just shows a list of
> fiction books.....
>
> Is there any way in CMS that i can access the directory name and then change
> the image based on the directory under which it is stored. Is any other
> approach to this problem?

Take a look at the following methods:

 CmsJspNavBuilder#getNavigationForFolder(String folder, int level)
       CmsJspBean#getRequestContext()
CmsRequestContext#getUri()
      CmsResource#getPathPart(String resource, int level)
      CmsResource#getPathLevel(String resource)


Regards,
Thomas




More information about the opencms-dev mailing list