I have an Umbraco V4 website and I am trying implement a gallery using Content flow (http://www.jacksasylum.eu/ContentFlow/). I am using the Related Media datatype (http://www.nibble.be/?p=64) that works in a similar way to the Related Links datatype built into Umbraco. I have managed to get it working ok using the following XSLT but I want to build in some sort of fault tolerance to make sure it still works if the user deletes the image from the media section but does not remove it from the Related Media picker on the node. The way I see it they could either delete the media item completely or just click the "Remove file" checkbox and click save. Either method would screw up my gallery so I want to add some sort of IF statement in to check that the media file exists before trying to display it. Can anyone help me out with this one? The code I have so far is as follows:
Check if media has been deleted
Hi All,
I have an Umbraco V4 website and I am trying implement a gallery using Content flow (http://www.jacksasylum.eu/ContentFlow/). I am using the Related Media datatype (http://www.nibble.be/?p=64) that works in a similar way to the Related Links datatype built into Umbraco. I have managed to get it working ok using the following XSLT but I want to build in some sort of fault tolerance to make sure it still works if the user deletes the image from the media section but does not remove it from the Related Media picker on the node. The way I see it they could either delete the media item completely or just click the "Remove file" checkbox and click save. Either method would screw up my gallery so I want to add some sort of IF statement in to check that the media file exists before trying to display it. Can anyone help me out with this one? The code I have so far is as follows:
is working on a reply...