Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi!
Just add a view named as your image media type to your ~/Views/Shared folder. If your media type is named ImageMedia the view should be called ImageMedia.cshtml and look something like this:
@model ImageMedia @if (Model != null) { <img src="@Url.ContentUrl(Model.ContentLink)" alt=""> }
I need to have a default view that is used for all images when added to a content area, is this possible to have? I know that I can add a view to the DisplayTemplates folder and reference it in the UIhint, but I don't want to restrict the content area to images only, and I would like to have a default behavior for all images. Is this possible?