Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

How to make href for content fragment

Avatar

Level 2

Hi All,

 

I have created one Content Fragment Model where I have included Start application path browser as shown below.

 

SunitaCh_0-1694610799331.png

 

Now I am using outbox Content Fragment List and Start application is coming like below.

SunitaCh_1-1694610987560.png

 

Here my requirement is that Start application should be hyperlink and open in new tab like below

SunitaCh_2-1694611635759.png

But I am not able to achieve it. Can somebody please let me know hoe can I achieve this ?

 

Thanks & Regards,

Sonu

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@SunitaCh You must be consuming this Content Fragment on a page via Content Fragment List Component. Please add rendering logic onto component markup as html using Sightly. HTML for reference:
https://github.com/adobe/aem-core-wcm-components/blob/main/content/src/content/jcr_root/apps/core/wc...

View solution in original post

6 Replies

Avatar

Correct answer by
Employee Advisor

@SunitaCh You must be consuming this Content Fragment on a page via Content Fragment List Component. Please add rendering logic onto component markup as html using Sightly. HTML for reference:
https://github.com/adobe/aem-core-wcm-components/blob/main/content/src/content/jcr_root/apps/core/wc...

Avatar

Community Advisor

Hello @SunitaCh 

 

The mark-up of Content Fragment component is raw. It only adds value and titles to HTML. I doubt you would use it in the same format.

 

To use the capabilities of Content Fragment:

- Extend the CF component

- Update HTL as per the need

- To render adaptive images, use image delegation. Example: Teaser component https://github.com/adobe/aem-core-wcm-components/blob/main/content/src/content/jcr_root/apps/core/wc...


Aanchal Sikka

Avatar

Administrator

@SunitaCh Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni

Avatar

Level 2

Yes , I have called this path inside the slingmodel and then call in HTL/sightly and making it link like below.

 

<a x-cq-linkchecker="skip" href="${table.startApplication}.html" target="_blank">Start application</a>