## Background
I'm working on implementing a shop catalog system in AEM where I need to handle multiple shop detail pages. Each shop's data is stored in Content Fragments based on a single "SHOP" model.
## Current Setup
- Multiple Content Fragments based on one Model (SHOP)
- Each Content Fragment represents a unique shop with different data
- Need to create individual detail pages for each shop
- Want to use Core Components for the page template
## Main Questions
1. What's the recommended 2024 approach for implementing dynamic detail pages using Content Fragments?
2. Is it possible/advisable to create ONE dynamic detail page template that:
- Uses a fixed template with Core Components
- Dynamically loads Content Fragment data
- Generates URLs based on shop name property (with duplicate prevention)
OR
3. Should I programmatically create individual pages for each shop using APIs?
## Additional Considerations
- Need to handle URL generation based on shop names
- Need a strategy for preventing duplicate URLs
- Want to ensure the solution is scalable for n-number of shops
- Looking for the most maintainable and performant approach
I'd appreciate insights from the community on current best practices and any potential pitfalls to avoid. If you've implemented something similar, I'd love to hear about your experience and lessons learned.
## Technical Environment
- AEM as a Cloud Service
- Using Core Components
- Content Fragment Model-driven approach
thanks for all the responses everyone
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Using GraphQL is indeed a modern, flexible approach to implementing dynamic content in AEM, especially for scenarios like your shop catalog where each detail page needs data from multiple Content Fragments.
GraphQL allows you to fetch only the data you need for each shop in a single query, reducing the complexity of multiple REST calls or backend logic to retrieve different parts of the shop data. You can design a GraphQL query that pulls all relevant properties from your SHOP Content Fragment model and its associated data in one request.
Instead of creating individual pages, configure a single detail page template in AEM that leverages GraphQL to fetch data .
Since each shop is fetched dynamically, you can use a clean, SEO-friendly URL structure like /shops/{shop-name}, and pass the shopName directly to the GraphQL query.
With GraphQL, you can define clear caching rules for individual fields or queries, optimizing content delivery.
Views
Replies
Total Likes
Hi @MIkolaj
Your CFs will reside in AEM in a location probably like /content/dam/brand/shops. Where you will have a structure like
- cf-shop1
- cf-shop2
...
- cf-shopN
I hope this untangles you a little bit and gives you an idea of the full solution that best fits your requirements.
Views
Replies
Total Likes
Views
Likes
Replies