[opencms-dev] API-question for Previous-Next-Links

Pavel Peringer pavel.peringer at qbizm.cz
Thu Feb 21 14:01:06 CET 2008


Hello

What about use build-in document type "photoalbum" from module 
org.opencms.frontend.photoalbum (OpenCms 6.2.3)?
There is all what do you need :-) Only time of shooting you should set 
in image "Description" property and enable to show it.

HTH

Pavel Peringer

Andreas Graeff napsal(a):

>Hello,
>I have a question about the OpenCms-API. Actually I have developed a new 
>XML-content type (named "photography") for a virtual galery. In a 
>preview page I'm displaying a thumbnail of all photos together with 
>title, text, datetime of shooting and a link to a new page 
>(photography.jsp), where the whole image is displayed. In 
>photography.jsp I want to have previous and next-links to these the 
>previous and photography (like photography.jsp?idx=%(number) ). To get 
>this, my idea was to get the index in the current collector and with a 
>simple decrement or increment of this index I have a values for my links 
>and can make a contentload with the pageIndex. Though I used not the 
>XML-API but pure Java.
>
>CmsJspXmlContentBean content = new CmsJspXmlContentBean(pageContext, 
>request, response);
>CmsJspTagContentLoad contentlist = 
>(CmsJspTagContentLoad)content.contentload("allInFolder", 
>"%(opencms.folder)%(*)|photography", false);
>   
>But how can I get the index of the content in contentlist? With
>
>CmsContentInfoBean oCmsContentInfoBean = new CmsContentInfoBean();
>oCmsContentInfoBean = contentlist.getContentInfoBean();
>
>it is not possible, cause the getContentInfoBean()-method is protected, 
>not public.
>Is there any other way to get these informations (esp. resultsize and 
>resultIndex)?
>
>Or is there any other way to get the informations from a 
>CmsJspTagContentLoad to a CmsContentInfoBean? I also tried
>
>CmsJspTagContentInfo oCmsJspTagContentInfo = new CmsJspTagContentInfo();
>oCmsJspTagContentInfo.storeContentInfoBean(contentlist);
>
>but method storeContentInfoBean() is also protected. Why are these 
>methods protected? Actually it doesn't make much sense for me, but I'm 
>sure I'm missing some informations ;-).
>Thank you for response,
>Regards
>Andreas Graeff
>
>
>
>_______________________________________________
>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
>  
>

-- 
Bc. Pavel Peringer                          Qbizm technologies, a.s.
Developer                                   ... the art of software.
____________________________________________________________________
www.qbizm-technologies.cz    www.qbizm.cz      www.qbizm-services.cz




More information about the opencms-dev mailing list