Custom rollout action | Community
Skip to main content
Deepikaa_Nagesh
Level 3
Apr 23, 2020 12:10 PM UTC
Solved

Custom rollout action

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.
joerghoh
joerghohAccepted solution
Employee
Apr 24, 2020 8:02 PM UTC

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.

8 replies

joerghoh
joerghohAccepted solution
Employee
Apr 24, 2020 8:02 PM UTC

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.

Translate
Deepikaa_Nagesh
Level 3
Apr 30, 2020 7:39 AM UTC
Thanks Jorg , this solution is working out well for us.
Translate
Peter_Puzanovs
New Participant
Apr 23, 2020 3:35 PM UTC

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

Translate
Deepikaa_Nagesh
Level 3
Apr 23, 2020 3:45 PM UTC

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

Translate
arunpatidar
New Participant
Apr 23, 2020 1:47 PM UTC

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

Translate
Arun Patidar
Deepikaa_Nagesh
Level 3
Apr 23, 2020 2:33 PM UTC

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.

Translate