AI OnAI Off
Hi,
Could you show your code? And give more details what would you like to implement?
Hey,
I would like to use it to as a page where the custom image cropping tool will be located.
In terms of the code, I followed the documentation (link in the previous post):
[TemplateDescriptor(Default = true, Tags = new[] { RenderingTags.Preview })] public partial class ImageFilePreview : PreviewPage, IRenderTemplate<ImageFile> { }
Thanks, M
As far as I remember (could be wrong) Media data preview handler is responsible for this. It has following attributes set:
[TemplateDescriptor(AvailableWithoutTag = false, Inherited = true, TagString = "Preview", TemplateTypeCategory = TemplateTypeCategories.HttpHandler)] public class ImagePreviewHandler : MediaPreviewHandlerBase, IRenderTemplate<IContentImage>, IRenderTemplate { }
This is how we've solved it for a generic file in a project. Guess it should work for image as well.
[TemplateDescriptor( Inherited = true, AvailableWithoutTag = false, Tags = new[] { RenderingTags.Edit }, TemplateTypeCategory = TemplateTypeCategories.MvcController, Path = "/Views/GenericMedia/Index.cshtml" )] public class GenericMediaController : ActionControllerBase, IRenderTemplate<GenericMedia> { public ActionResult Index(GenericMedia currentBlock) { return View(currentBlock); } }
Hi All,
I've trying to switch default property preview for a custom one. I followed this article: http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/75/Content/Assets-and-media/Custom-editing-preview-for-media/.
For some reason I created a custom view for the preview. Once compiled and run it is not being picked up by the CMS. Instead the default preview is not displaying a preview any more:
I am very quite new to the platform - must be something very lame!
Many thanks,
M