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

Andreas Graeff andreas at urthona.de
Thu Feb 21 14:34:08 CET 2008


Hello,
good point Pavel, looks like the photo album fits most of my needs ;-). 
Especially I don't have to worry about date formating if I simple put 
the shooting date  into the description ;-). My mistake :-), I started 
developing with OpenCms 6.0.4 (actual customer installation), changed to 
OpenCms 7.0.3 yesterday.
But the question for the api remains for me, maybe not for the curent 
photo galery but for further development, where I want to have different 
kind of access to the parameters of a contentloop. Any ideas?
Thank you and Regards
Andreas Graeff



Pavel Peringer schrieb:
> 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
>>  
>>
>>     
>
>   




More information about the opencms-dev mailing list