The following code will not work since the the Index name is randomPage instead of currentPage.
This is one really bad design from EpiServer since it's ok MVC pattern but apparently wont hook correctly to episervers architecture.
Wont Work:
public class FlexLandingPageController : PageController<FlexLandingPage>
{
public ActionResult Index(FlexLandingPage randomPage)
{
var model = new FlexLandingPageViewModel<FlexLandingPage>(randomPage);
//model will be == Null!
return View(model);
}
}
Will work:
public class FlexLandingPageController : PageController<FlexLandingPage>
{
public ActionResult Index(FlexLandingPage currentPage)
{
var model = new FlexLandingPageViewModel currentPage)
//model !=Null
return View(model);
}
}