Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

I want to provide download button feature in Content Fragment

Avatar

Level 2

Hey 

 Hi I want to   provide download button feature in Content Fragment 

Pls provide Any Suggestions on it 

Thanks in Advance

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I don't think so you can achieve this using CF, but you can achieve this using experience fragments, for that you need to create the component based on your requirement where you have control to design the component the way you want and create experience fragment using the component, then refer the XF on page. 

Content Fragments are better fit to expose the data as it is in multiple pages or expose data as API. 

Please explore XF documentation as well and see if that helps.

https://experienceleague.adobe.com/docs/experience-manager-learn/sites/experience-fragments/experien... 

View solution in original post

10 Replies

Avatar

Community Advisor

If you go to content fragment models localhost:4502/assets.html/content/dam/content-fragments page and select CF, then you can find option to download entire content fragment itself. Please try that and see if that meets your requirement.

Ref: 

Siva_Sogalapalli_0-1672744802114.png

 

Avatar

Level 2

SYED1111_0-1672745133021.png

I want make download that image when we click on download feture  .in content fragment

SYED1111_0-1672745269079.png

 

Avatar

Correct answer by
Community Advisor

I don't think so you can achieve this using CF, but you can achieve this using experience fragments, for that you need to create the component based on your requirement where you have control to design the component the way you want and create experience fragment using the component, then refer the XF on page. 

Content Fragments are better fit to expose the data as it is in multiple pages or expose data as API. 

Please explore XF documentation as well and see if that helps.

https://experienceleague.adobe.com/docs/experience-manager-learn/sites/experience-fragments/experien... 

Avatar

Community Advisor

@SYED1111  Correct me if i am wrong, You wanted to download the image (or list of images) which is configured on the content fragment. Right? 

 

In that case why not you create a custom component which reads the current page jcr and read the content and download the image configured. 

 

Why do you want to overlay and put the download button on the main menu? 

 

Avatar

Level 2

Hey Hi Jagadeesh,

 No I want to provide download option For Pdf (User guide)

In My Story Point they mention provided download option in content fragment for download (pdf) document.

 Thnx for rply 

Avatar

Employee Advisor

@SYED1111 If I understand it correctly, you have your image authored in Content Fragment. When this CF is added to a Component on a Page, you want to show a Download button for the Image contained in the CF.

Avatar

Level 2

SYED1111_0-1672754943033.png

Pls Read this Again to follow 

 

Thanx all I got some idea on this

Avatar

Community Advisor

@SYED1111  May be we are not getting the exact ask. Let us know what idea that you are following

Avatar

Community Advisor

@SYED1111 , can you please tell me how you are using content fragment on the  page, thru any custome component, which is having cf picker filed, or exposing CFs data to any UI to generate the look and feel?

In first scenario(in case of custom component) you can write HTML logic in sightly to have the feature to make the PDF or image downloadable.

In second scenario(exposing cfs data to some UI like React or Angular or any other stuff) here you can write your downloadable logic to accomplish your requirement.

but any how you need to do it on front-end(HTML or JS) only as far as I know.

Hope this helps.

Umesh Thakur