Teaser Contents created from extended CQ OfferPage does not show up on Teaser Component | Community
Skip to main content
June 2, 2017
Solved

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

  • June 2, 2017
  • 3 replies
  • 1157 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

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

3 replies

smacdonald2008
Level 10
June 2, 2017

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.

June 2, 2017

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

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
June 6, 2017

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