Last active
August 29, 2015 14:08
-
-
Save danlister/b2d65240cb0682152502 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The below action works correctly when a template exists | |
// for the current page. When a template has not been selected | |
// or does not exist, the ambiguous action method | |
// exception occurs. | |
// | |
// I'm starting think this is correct behaviour because | |
// MyPageController has an action called Index and so does | |
// RenderMvcController. Therefore, having duplicate routes. | |
// | |
// What I'm not quite certain about is why the exception | |
// only occurs when a view does not exist or when one has not | |
// been selected in the back office. | |
public class MyPageController : RenderMvcController | |
{ | |
public ActionResult Index(RenderModel model) | |
{ | |
return new RedirectToUmbracoPageResult(model.Content.Parent); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment