Expand my Community achievements bar.

SOLVED

Custom rollout action

Avatar

Level 3

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.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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.

View solution in original post

8 Replies

Avatar

Level 3

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.

Avatar

Community Advisor

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

Avatar

Level 3

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

Avatar

Level 3
Also forgot to mention, we pull images from dynamic media. So i think as long as we have image cached in DM, we cannot return 404 selectively.

Avatar

Correct answer by
Employee Advisor

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.

Avatar

Level 3
Thanks Jorg , this solution is working out well for us.