Accessing current page index in basic repeater

Jen Pearson asked on June 16, 2017 06:04

I have a list of custom items of the same page type being displayed in a basic repeater with a page size of 1. I want to implement my own navigation for the back and forward through the items.

I tried using a Text / XML transformation so I'm not sure if I have to revert to using ASCX.

However DataItemCount works fine for the number of items but not the current "item" index. I have tried DataItemIndex and DisplayIndex which are always zero. I have tried accessing the current Pager (although ideally I want to hide this) but am not 100% sure how to reference it.

I also need to be able to navigate to the next and previous item. I'm sure I could make use of the querystring page parameter in a custom method but don't know how to write or how to call this. I am struggling to find examples which don't simply involve evaluating a column value.

Correct Answer

Jan Hermann answered on June 16, 2017 10:52

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on June 16, 2017 09:16

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.