Teaser Contents created from extended CQ OfferPage does not show up on Teaser Component
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