adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
743 stars 750 forks source link

[AMP] Multiple style amp-custom elements per page #1116

Closed kiransg89 closed 3 years ago

kiransg89 commented 4 years ago

Bug Report

Current Behavior With AMP selector none of the example site are working as expected

Expected behavior/code Should render AMP page

Environment AEM 6.4

Possible Solution

Additional context / Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.

msagolj commented 4 years ago

@kiransg89 this a very vague description of your issue :) Please add more context: exact AEM version, Core Comp Version, what errors do you observe, reproducible steps ?

The AMP extension has been tested with example project on 6.4.8.1 and 6.5.5, see also working example page at: https://www.aemcomponents.dev/content/core-components-examples/library/page-authoring/text.amp.html

kiransg89 commented 4 years ago

Hi @msagolj , I am currently working on AEM 6.4.8 and I am using core components version 2.11.0 (Recent release). I am seeing following issue in AMP for image page: image Is their someway can we call global clienlibs by calling

<style amp-custom data-sly-use.clientlibs="${'com.adobe.cq.wcm.core.components.models.ClientLibraries' @ resourceTypes = page.componentsResourceTypes, filter='.*\.amp', ### categories='globals'}"> ${clientlibs.cssInline @ context="unsafe"}

If I do the above then component level clientlibs are not getting picked up

vladbailescu commented 4 years ago

Indeed, as per https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/:

Define CSS within the