Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Havng trouble, with this, I need to check the media picked item (an image) exists and if it does render it out.
I get a generic macro error, if I do not wrap it in the if statement and the image has been picked it works.
@{ if(@Model.audioImage != null) {dynamic image = new umbraco.MacroEngines.DynamicMedia(@Model.audioImage);<img src="@image.umbracoFile" width="270" height="178" /> } }
Hi Rocoeh,
Try changing this if(@Model.audioImage != null) { dynamic image = new umbraco.MacroEngines.DynamicMedia(@Model.audioImage); <img src="@image.umbracoFile" width="270" height="178" /> }
to
var img = @Model.Media("audioImage","umbracoFile"); if(!String.IsNullOrEmpty(@img)){ <img src="@img" />}
Hope this helps
//fuji
That was perfect. Thanks,
Great if i could help...
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Check a media item exsits
Havng trouble, with this, I need to check the media picked item (an image) exists and if it does render it out.
I get a generic macro error, if I do not wrap it in the if statement and the image has been picked it works.
@{
if(@Model.audioImage != null) {
dynamic image = new umbraco.MacroEngines.DynamicMedia(@Model.audioImage);
<img src="@image.umbracoFile" width="270" height="178" />
}
}
Hi Rocoeh,
to
Hope this helps
//fuji
That was perfect. Thanks,
Great if i could help...
//fuji
is working on a reply...