Logic within repeater

Shawn Ebeyer asked on September 14, 2016 22:13

Hello,

I'm trying to pull data from two different page types into a repeater. Once I have the data, here's what I'd like to do with it:

First, I need to iterate over all items(pages) within a specific folder and display a couple fields of information, pulled from each one of these pages. This is working.

Secondly, each one of these pages has a set of sub pages. I need to iterate over each sub page, in each one of these pages, and display some more information.

I do not want to use a hierarchal viewer/control and am wondering what is the best way to do this? Can I nest repeaters? Can I stick a for loop inside the repeaters transformation?

Any ideas and help is as always, much appreciated.

Thanks in advance,

Shawn

Recent Answers


Brenden Kehren answered on September 14, 2016 22:36

Nested repeaters and any other options (custom transformation method, loop within a text/ascx transformation) are all bad ideas because they require another call or calls to the database and will kill the performance of that page.

The best way to do this is using a universal viewer with hierarchical transformations.

Any particular reason you don't want to use hierarchical transformations/viewers?

0 votesVote for this answer Mark as a Correct answer

Shawn Ebeyer answered on September 14, 2016 22:56

Hi Brenden,

I was unaware of the performance issues that doing it this way would cause. I'll certainly look into using a universal viewer with hierarchical transformations for performance sake!

Thanks,

Shawn

0 votesVote for this answer Mark as a Correct answer

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