Last active
November 25, 2019 10:43
-
-
Save mattbrailsford/7f6f04fd8b0e55dde90eea96ebb59d87 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class MyController : SurfaceController, IRenderController | |
{ | |
// Hijack route for doc type MyPage | |
[HijackRoute("MyPage")] | |
public ActionResult MyPage(ContentModel model) | |
{ | |
// Do some stuff here, then return the base method | |
return base.Index(model); | |
} | |
// Hijack route for doc type MyPage using template MyTemplate | |
[HijackRoute("MyPage", "MyTemplate")] | |
public ActionResult MyOtherPage(ContentModel model) | |
{ | |
// Do some stuff here, then return the base method | |
return base.Index(model); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment