Using nested repeater to show 2nd level child pages

Jon White asked on February 12, 2016 11:49

Hi there,

I'm trying to display a link to a child page and also link to 2nd level child pages on the same landing page.

I'm using a repeater for the first level, but figured I'd have to use a nested repeater to target the second level. I assume this is what I need, (although I've never used a nested repeater):

Types of fruit (landing page) (level 0)

Apples (level 1 child) --> Granny smith | Cox (level 2 children)

Oranges (level 1 child) --> Satsuma | Mandarin (level 2 children)

I need to get the level 2 child pages for each section (not just ALL second level children in one list).

So what I want is a list on the 'types of fruit page' that is like this:

Apple (level 1 child)

Granny smith | Cox (level 2 children)


Oranges (level 1 child)

Satsuma | Mandarin (level 2 children)


Sorry I've used fruit to explain this! I feel like there is an obvious answer that I'm missing.

Any help is much appreciated, Thanks Jon

Correct Answer

Brenden Kehren answered on February 12, 2016 13:51

I'd check out the Hierarchical Viewer, this was designed for nested data and is much more efficient than a nested repeater.

0 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on February 12, 2016 13:53

Hi,

To prevent overhead I think its better if you use the Hierarchical viewer. This will allow you to customize (using different transformations) output per level.

You can find some best practices on working with menus here: http://devnet.kentico.com/articles/best-practices-for-implementing-site-navigation-in-kentico

Greets,

David

0 votesVote for this answer Mark as a Correct answer

Jon White answered on February 15, 2016 10:38

Thanks to both of you, I played around with this and managed to get it working, I'm not fully sure how it all works to be honest but hey ho I will try and get used to using it as I can see this being used in future.

0 votesVote for this answer Mark as a Correct answer

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