I am trying to render the class ImageFile (inheriting from ImageData). I figured since Media is Content in EPi7.5, I would be able to add images to a ContentArea and this works great. I'm just not able to setup a controller/view for rendering the ImageFile. I setup a new controller inheriting from PartialContentController<ImageFile> but in the ActionResult Index the ImageFile parameter passed is null. Is it not possible to render Media using a controller/view?
public class MediaPartialContentController<T> : PartialContentController<T> where T : MediaData
{
}
[TemplateDescriptor(TemplateTypeCategory = TemplateTypeCategories.MvcPartialController, Inherited = true)]
public class ImageFileController : PartialContentController<ImageFile>
{
public override ActionResult Index(ImageFile imageFile)
{
return PartialView(imageFile);
}
}
Hi,
I am trying to render the class ImageFile (inheriting from ImageData). I figured since Media is Content in EPi7.5, I would be able to add images to a ContentArea and this works great. I'm just not able to setup a controller/view for rendering the ImageFile. I setup a new controller inheriting from PartialContentController<ImageFile> but in the ActionResult Index the ImageFile parameter passed is null. Is it not possible to render Media using a controller/view?