אתה מציג תוכן עזרה עבור גרסה:

The intention of extending a default component is to alter the appearance or behavior of a component for specific uses.  

 The path to the component is unique and references the default component as a super resource type.  There is less risk as the scope is limited compared to the global scope of a component overlay. 

הערה:

Extending an overlaid component is not supported.

Example

Suppose the header for the comment component must display with an alternate appearance on one site of the AEM instance, while appearing with the default display on another site. Instead of overlaying the default comment, which changes the comment component for all instances, a better solution is to ensure there are multiple comment components available for use on various sites.

To implement this solution, create a new component that extends (overrides) the existing one and modify the Handlebars script. The area of the site that uses the new comments can use the extended one, while the sites that use the default appearance remain unaffected.

The comment component is actually one of two components which comprise the comment system.  Thus, there are two components to extend : comments and comment.  The script to edit is in the comment component's header.hbs file, while the parent comments component (the comment system) is what an author actually adds to the page.

To extend comments you will need to:

  1. Create the Components
  2. Add Comment to Sample Page
  3. Alter the Appearance

עבודה זו בוצעה ברישיון של Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  הודעות המתפרסמות ב- Twitter™‎ ו- Facebook אינן מכוסות בתנאי Creative Commons.

הצהרות משפטיות   |   מדיניות פרטיות מקוונת