A client wants the ability to choose either flash files or images via their media picker field, so I need a way of checking that the item is a .swf first (and presenting it in the appropriate HTML if so) or else returning the image in an <img> tag.
Is the best way to code this in a macro, or can it be done neatly in the template?
Media type either flash file or image file
Hi,
A client wants the ability to choose either flash files or images via their media picker field, so I need a way of checking that the item is a .swf first (and presenting it in the appropriate HTML if so) or else returning the image in an <img> tag.
Is the best way to code this in a macro, or can it be done neatly in the template?
Thanks all
You can check
For the filetype, e.g.
Hope this starts you in the right direction
Dan
Thanks Dan - for the record the following code seems to work (although I've no doubt it could be cleaner/better)
is working on a reply...