AI OnAI Off
Hi! In what path do you have your block view? If you don't have a custom view engine the standard location should be ~/Views/Shared/SlideBlock.cshtml.
Thanks Mattias. That was the solution. I had the view in a different directory.
No problem Ken. If you want to use a different directory you can have your own ViewEngine:
public class MyViewEngine : RazorViewEngine { public MyViewEngine() { PartialViewLocationFormats = PartialViewLocationFormats.Union(new[] { "~/Views/Shared/Blocks/{0}.cshtml" }).ToArray(); } }
Register it in Application_Start in Global.asax.cs:
ViewEngines.Engines.Insert(0, new MyViewEngine());
I'm learning EPiServer 7.5, and have created a couple of blocks for an image slider. We're doing this in MVC. I've added a ContentArea to a view, and am able to successfully drag blocks to the view and also to use the "create a new block" link that appears in the content area. However, after adding one or more blocks, the area where each block would appear displays a message like the following:
"The 'SlideBlock' can not be displayed"
This message persists whether I publish the changes or not. Upon selecting the properties icon for any of these blocks, I see the following menu options:
But I don't see the "Display As" menu option with it's submenu of choices. That may be where my problem stems.
This is my SlideBlock view.
And this is my SlideBlock model.
What do I need to change to make these blocks appear? Thanks for your help.