Custom rollout action | Community
Skip to main content
Deepikaa_Nagesh
April 23, 2020
Solved

Custom rollout action

  • April 23, 2020
  • 3 replies
  • 9383 views

Hi ,

 

is there a possibility to change image references on page roll out?

 

Use case : Same image has different expiry dates for different countries.

We are planning to duplicate the image for countries and add respective expiry dates since only one expiry date is possible for a image.

The challenge here is , image reference should change automatically on roll out of page from source to live copy like how it does for page links.

 

any alternative ideas are welcome.

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

If you have different expiration dates per country/tenant, I would extend the asset metadata by a structure to store the per-country/tenant expiration on the asset itself, instead of duplicating it.

Then you can adjust your rendering in a way, that the asset is not being referenced from the page (that means: no img-tag), if the expiration date has passed for the context it is displayed. This also works for Dynamic Media.

3 replies

arunpatidar
Community Advisor
Community Advisor
April 23, 2020

Check article to see how to create custom rollout action https://balawcm.wordpress.com/2014/01/29/custom-cq-live-action/

Arun Patidar
Deepikaa_Nagesh
April 23, 2020

Thanks Arun for the link. I did go through this earlier, i know we can write custom action. But i wanted to do something more generic like how the page references gets updated, like kind of similar thing for dam livecopy images as well. So wanted to know if that will work if i mimic same actions of page reference update. Like if anyone had given a try on it.

Peter_Puzanovs
Community Advisor
Community Advisor
April 23, 2020

Hi Deepikaa,

 

Is your requirement to copy all images for all locales?

Why would you want to duplicate your image to different locales, having big DAM increases costs directly or indirectly?

 

Simply add expiries for different regions as meta-data for one asset, it's easier to maintain it that way.

Then once you hit your image servlet, check for expiry time for this locale and if expiry has been hit, show 404 to the user.

 

Regards,

Peter

Deepikaa_Nagesh
April 23, 2020

Hi Peter,

 

Thank you for your valuable inputs.

I agree, duplicating is not right option but i m bit confused how to give 404 for a specific locale? We actually deactivate the image on expiry date.

Can you shed some light on image servlet that you are referring to? do you mean to say ,like handle it in image component ?

 

Note: This doesn't apply to all images of website, may be 10% of it.

 

Thanks,

Deepikaa

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
April 24, 2020

If you have different expiration dates per country/tenant, I would extend the asset metadata by a structure to store the per-country/tenant expiration on the asset itself, instead of duplicating it.

Then you can adjust your rendering in a way, that the asset is not being referenced from the page (that means: no img-tag), if the expiration date has passed for the context it is displayed. This also works for Dynamic Media.

Deepikaa_Nagesh
April 30, 2020
Thanks Jorg , this solution is working out well for us.