Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Looking for solution to fetch multiple products info

Avatar

Level 3

We've a requirement where we need to build custom navigation solution and below is the site structured.

 

Products >> TV >> LG >> LG Accessories/setup >> Cable Type

                                                                    >>  Adapters

                                                                    >>  Speakers

Products >> TV >> SAMSUNG >> SAMSUNG Accessories >> How to fix

                                                                                             

Products >> TV >> SONY >> SONY Accessories/setup >> Technical support

 

Cable Type, Adapters, Speakers are common across all type of TV categories and Navigation should have some design like this.

 

LG >> LG Accessories/setup >> Cable Type

                                                >>  Adapters

                                                >>  Speakers

                                               

SONY >> SONY Accessories >> >>Technical support

                                                                 >> Cable Type

                                                                 >>  Adapters

                                                                 >>  Speakers

SAMSUNG >> SAMSUNG Accessories >> How to fix

                                                                 >> Cable Type

                                                                 >>  Adapters

                                                                 >>  Speakers

 

So the content pages are created at one level, but for the navigation it will be scattered in different categories level.  I know we can achieve this using tagging but it's becomes challenge with tags because we need to run multiple queries to get info at each category level which might be an issue with performance as well. 

FYi, the above is just sample structure but we have 100s of pages from which navigation should be rendered.

Looking for inputs on the solutions which meets requirements as well as performance wise.

 

Thanks In advance. 

 

 

 

 

                 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Let's keep it simple. Have your navigation component expose a multi-field for root level paths. With this configured in your component's properties, you can recursively iterate through it and it's children to output your own navigationItems.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Let's keep it simple. Have your navigation component expose a multi-field for root level paths. With this configured in your component's properties, you can recursively iterate through it and it's children to output your own navigationItems.