AI OnAI Off
My guess is you have to manually add custom page edit routes to RouteCollection. The default page edit route looks like this:
routes.MapEditRoutes( "editpageroot", RouteCollectionExtensions.CmsHomePath + "{language}/{nodeedit}/{partial}/{action}", new { action = "index" }, null );
RouteCollectionExtensions.CmsHomePath is unfortunately private and contains this:
private static string CmsHomePath { get { return VirtualPathResolver.Instance.ToAppRelative(VirtualPathUtility.AppendTrailingSlash(ModuleResourceResolver.Instance.ResolvePath("CMS", "Content"))).Substring(1); } }
Thanks for the responses. Maybe I can reuse the same controller class for multiple Page/Blocktypes?
theoretically you can if contnet types are "compatible". look for TemplateDescriptors keyword in documentation.
Thanks. I ended up just creating a page for each controller. With a baseclass for shared properties.
When a single PageController has multiple methods that return different Views, these views does not seem previewable in preview mode in the CMS system, when clicking an actionlink to the view in edit mode I am returned to the Index page. The content is not inline editable.
So e.g. if I have a class:
And in the Index.cshtml view:
This works fine in the non edit mode, but clicking the button in edit mode does not load the Edit page but returns to the index page and the content is not inline editable.
How do you deal with this? Do I really hav to make PageTypes and PageControllers for each view?