November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
I think there are a few issues here.
First of all you are using a TemplateDescriptor on your model, but a TemplateDescriptors should be used on a controller. In your case I don't think you want a RenderingTag on your OverviewPageController, you probably want to use a tag on your contentarea to use a special rendering for the DetailPages dropped there.
Like this:
@Html.PropertyFor(x => x.CurrentPage.RoomTypes, new { Tag = "Overview"})
Second, if you want to render pages in a ContentArea you have define a partial view for these pages.
In your case you can register this partial view as:
viewTemplateModelRegistrator.Add(typeof(DetailPage), new TemplateModel
{
Name = "DetailPageOnOverviewPage",
Inherited = true,
AvailableWithoutTag = false,
Tags = new[] { "Overview" },
Path = String.Format("~/Areas/{0}/Views/Shared/PagePartials/DetailPage.cshtml", areaName)
});
Hi Mark,
The Tag on my model was indeed a mistake and with moving it to my view it worked. Thank you!
Hi,
I have a page (OverviewPage) with a contentarea in which I want to put pages of type DetailPage:
These DetailPages can be placed under the OverviewPage in EPiServer. My OverviewPage class looks something like:
My url /nl-nl/kamers-suites (OverviewPage) works and my url /nl-nl/kamers-suites/junior-room (DetailPage) also works.
As you can see, I defined a Tag on my OverviewPage and I would like that when I drag a Detailpage in my RoomTypes contentarea, this page is rendered differently.
In the past I have only done this with blocks and the ViewTemplateModelRegistrator, this worked fine. I have added the following line:
In EPiServer it says that the page in the content area cannot be rendered and the output in my browser is blank (literally nothing). In the logs I see the following error. I do not know for certain that it is related:
2014-06-23 15:34:21,232 [9] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
System.Web.HttpException (0x80004005): The controller for path '/__browserLink/requestData/3244e3a31f40438cabcae6d155e8c1fd' was not found or does not implement IController.
bij System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
bij System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
bij System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
bij System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
bij System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
bij System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
hope somebody can help. Thanks in advance!