|Description||Displays a link as a primary, secondary, or tertiary link/CTA|
|Supported AEM Versions||6.5|
|Component Group||Cheerios Experience|
The Anchor component is a custom component created for the Cheer.IOs experience. It was not extended from a WCM Core component.
Extending the components can be done in multiple ways depending on the needs of the brand component.
Use this approach if you do not have any required html markup changes or backend java changes. This will only update the title of the component, componentGroup and point to the resourceSuperType. Optionally can extend the description.
Use this approach if you need to update css classes or add data attributes and do not need to change the backend model, or potentially want to use a different model by retain all of the markup in the component-tmpl.html (Component Template) markup.
The component template is usually named component-tmpl.html this file contains the html markup. Update this file if you need to change the html structure of the component.
Use this approach if you need to change the Sling Model to update the backend logic.
Files that will need to be added when extending:
It is possible to extend more than just the component.html file, if necessary any file that is resourceSupertyped can be extend for example if something needs added to the dialog.
The following properties are written to JCR for this Link component and are expected to be available as Resource properties:
- jcr:primaryType: nt:unstructured
- jcr:createdBy: E524Z2
- jcr:lastModifiedBy: E524Z2
- target: _blank
- link: https://confluence.ehi.com/display/AEMDEV/Cheerios+Link+Component
- label: Text Link Example
- style: cmp-link__link--primary
- sling:resourceType: ehi-core/aem65/components/content/link/v1/link