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
Hello,
I am trying to display an image in my template in U9. I am using this command:
<img src="@Model.Image.MediaItem.Url"/>
But I only get an error:
'MediaWithCrops' does not contain a definition for 'MediaItem'
in the CMS, the field Image is a Media image picker.
What did I do wrong? =/
Any help would be much appreciated. Thanks in advance!
Try this:
<img src="@Model.Image.Url()"/>
Hi, thanks for replying to this.
I still get an error with your suggestion:
'NewsArea' does not contain a definition for 'Image' and no accessible extension method 'Image' accepting a first argument of type 'NewsArea' could be found (are you missing a using directive or an assembly reference?)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
displaying an image in my template (U9)?
Hello,
I am trying to display an image in my template in U9. I am using this command:
But I only get an error:
in the CMS, the field Image is a Media image picker.
What did I do wrong? =/
Any help would be much appreciated. Thanks in advance!
Try this:
Hi, thanks for replying to this.
I still get an error with your suggestion:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.