November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
I think you might find the answer in this thread: http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=60495 there is also a blogpost about this by johan björnfot:
http://world.episerver.com/Blogs/Johan-Bjornfot/Dates1/2012/9/EPiServer-7--Rendering-of-content/
Thanks Eric,
I figured those posts was out of date since they were using the RenderDescriptor rather that its replacement TemplateDescriptor ?
Either way I tried following the post:
http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=60495
but with the RenderDescriptor replaced with TemplateDescriptor but to no avail. I still get the same error, "the controller for path "/" was not found or does not implement IController.
I have read the TemplateResolver algorithm etc and as far as I can see it should work with what I have done.
* I have a controller set to render a page type when a specific tag is set in the rendering context.
* I set this tag in the rendering of the ContentArea with @Html.PropertyFor(m=>m.MyPageTeasers, new { Tag = "Teaser" } )
Surely it should be the same principle as how the DisplayChannels work ?
* Create another Controller to render the content when tag named according to your Display Channel is set.
* Set the Display Channel in Edit mode.
FYI,
It looks like my biggest mistake was not following the MVC convention of suffixing all controllers with 'Controller'
So stripped back to basics all you do need is a PageController<T> set to render page type T when specific tag is set.
**Note however that I did need to add the TemplateTypeCategory=EPiServer.Framework.Web.TemplateTypeCategories.MvcPartialController
**Note controller name now ends with 'Controller'
So my controller now looks like :
[TemplateDescriptor(Tags=new string[]{"Teaser"}, TemplateTypeCategory=EPiServer.Framework.Web.TemplateTypeCategories.MvcPartialController)]
public class MyPageController_TeaserController : PageController<MyPage>
{
public ActionResult Index(MyPage currentPage)
{
return View(currentPage);
}
}
Hi,
I'm trying to figure out how to create a second MVC template renderer (controller ?) to handle rendering a Page when added to a ContentArea. With Page
Server Error in '/' Application.
The controller for path '/' was not found or does not implement IController.
My HomePage which contains the ContentArea property MyPageTeasers has the following markup in its View
@Html.PropertyFor(m => m.MyPageTeasers, new { Tag = "Teaser" })
As far as I understood this was all that should be required to have the second template renderer (controller) be used when the ContentArea is rendered and the Tag "Teaser" is set in the rendering context ?
Has anyone managed to do this in MVC ?