Expand my Community achievements bar.

SOLVED

Teaser Contents created from extended CQ OfferPage does not show up on Teaser Component

Avatar

Level 1

Hi ,

We have extended OfferPage Component - /libs/cq/personalization/components/teaserpage and created /apps/myproject/components/teaserpage

and extended Teaser Template /libs/cq/personalization/templates/teaser and created /apps/myproject/templates/teaser.

Create Offer pages in Campaign Tool using /apps/myproject/templates/teaser Offer Page Templates. In Teaser component we configured to point to campaign location for Offer pages created from extended OfferPageTemplate.

follo

We found that contents is not loading on Teaser Component giving - "No Campaigns target this Teaser".  While Debugging found that in teaser component following code does not return any teasers.

    JSONObject teaserInfo = targetedContentManager.getTeaserInfo(resourceResolver, campaignPath, location);

Above returns  response {"allTeasers":[]}

We checked class com.day.cq.personalization.TargetedContentManagerImpl.java for method getTeaserInfo(). This specifically looks only for teaserpages created from CQ - cq/personalization/components/teaserpage. This method does not have option to take from extended teaserpage.

Iterator<Page> teasers = campaign.listChildren(new ResourceTypeFilter("cq/personalization/components/teaserpage"));

Can anyone help how to retrieve teasers from extended teaserpage templates.

One option to extend TargetedContentManagerImpl class to override getTeaserInfo method to retrieve teasers from customized teaserpage template.

Regards,

Mac

1 Accepted Solution

Avatar

Correct answer by
Administrator

Check this :- Teasers and Strategies - docs.adobe.com

But in would not encourage you to use Teaser component as from 6.2 it is deprecated.

Note:- The Teaser component has been deprecated in AEM 6.2. Please use the Target component instead.

~kautuk



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Level 10

Are you following a online doc for this - can you point the community to your information source for this use case. Also - what AEM version are you using.

Avatar

Level 1

Hi,

There is no documentation for this online.

We have some clientlibs to be included in teaserpage template for components to work properly on teaser pages. This was main idea to extend OOTB TeaserPage Template and add these additional clientlibs. And then create TeaserPages using these extended TeaserPage Template.

We are using AEM 6.1 - SP1

Avatar

Correct answer by
Administrator

Check this :- Teasers and Strategies - docs.adobe.com

But in would not encourage you to use Teaser component as from 6.2 it is deprecated.

Note:- The Teaser component has been deprecated in AEM 6.2. Please use the Target component instead.

~kautuk



Kautuk Sahni