Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Help with CMS repeater and pagination. View modes: 
User avatar
Member
Member
sales-bluweb.co - 1/26/2010 2:03:56 PM
   
Help with CMS repeater and pagination.
I have a CMSRepeater control pointing at some news articles.


<cms:CMSRepeater ID="news" runat="server" ClassNames="cms.news" TransformationName="cms.news.preview"
SelectedItemTransformationName="cms.news.default" OrderBy="NewsReleaseDate DESC" EnablePaging="true" PagerControl-PageSize="20"/>


When I'm viewing a news article (SelectedItemTransformationName) I want to add next and previous buttons, that will page through the news articles. Does anyone know how to implement this?

By the way - I don't mean paging when previewing the list of news articles.

Hope this makes sense and hope someone can help me.

Many thanks,

Tom.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 1/27/2010 8:42:02 AM
   
RE:Help with CMS repeater and pagination.
Hello,

Unfortunately, this feature is not natively supported. With the DataItemIndex, you can get the next and previous index number. You can get item only by calling SelectNodes method and using custom code in custom function for transformation (http://www.kentico.com/docs/devguide/adding_custom_functions_to_transformations.htm).

Best regards,
Boris Pocatko

User avatar
Member
Member
sales-bluweb.co - 1/31/2010 11:21:26 AM
   
RE:Help with CMS repeater and pagination.
Is there any chance you could explain in more detail. I'm not entirely sure from your explanation what you mean. Which object exposes the DataItemIndex property? and SelectNodes? Is the data stores in xml format? Hope you can help me further.

Tom.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 2/4/2010 8:11:17 AM
   
RE:Help with CMS repeater and pagination.
Hello,

You can see how to use the DataItemIndex property in the following forum thread.

After you've got the current DataItemIndex you can find out the next and previous item and generate links with a custom function.

Best regards,
Boris Pocatko