Highlighted

Product specific rendering of page

Avatar

Avatar

Adilmo

Avatar

Adilmo

Adilmo

05-03-2019

Hi All,

We are trying to design an AEM front end based website.

Can the page while loading (based on some input parameter -- product code etc) dynamically load different template ?

For the same page --- lets say products details page. We need to render different page templates. Is there any pattern to achieve this in AEM ??

Replies

Highlighted

Avatar

Avatar

Albin_Issac

MVP

Avatar

Albin_Issac

MVP

Albin_Issac
MVP

29-04-2019

My perspective this can be achieved as below

1. Create product type specific templates - eg. eBook, book etc

2. Add the the required components to the template(components may vary based on the type)

3. The components render the dynamic product data based on the product id passed in the URL

Regards

Albin I

Highlighted

Avatar

Avatar

antoniom5495929

Avatar

antoniom5495929

antoniom5495929

30-04-2019

Hi,

you cannot make this choose by using a sightly inclusion based on the product code into the base template?

Thanks,

Antonio

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

30-04-2019

Look at the We Retail example site and notice how that site handles different products - each one is its own separate page - based on the same editable template. That is how to handle products when using AEM.

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

30-04-2019

See this - all product pages based on Hero Editable Template - this reflects best practice and the way you should constuct your AEM sites to handle different products. Not to try and dynamically change the template itself:

WeRe.png