0

I have 365 days of images. some are gif's and others are pngs. Format is daymarker.png or daymarker.gif. They are random on the days and they don't follow any pattern.

Is there a way I can say IF image = `*.png return %%daymarker%%.png else %%daymarker%%.gif ?

Currently the images are housed in a DataExtension and I lookup based on a daymarker, but there's no click tracking when links are stored in a DE, that is why I need to move them to a content area.

1 Answer 1

2

Sounds like you're looking for the indexOf AMPscript function:

%%[

set @daymarker = AttributeValue("daymarker")

if indexOf(@daymarker,".png") > 0 then

 /* PNG handling */  

elseif indexOf(@daymarker,".gif") > 0 then

 /* GIF handling */  

else 

 /* default */  

endif

]%%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .