michaelp0730
10/6/2016 - 7:48 PM

Child Action Partial View

This variation snippet uses a child action route to return a partial view, rather than an entire view.

using ACOM.Web.Helpers.Variations;

[ChildActionOnly]
[Route("Ignite/LiveStream")]
public ActionResult IgniteLiveStream()
{
  return new VariationPartialResult(
    "ignite-event",
    new VariationModel("event-contingency", "Parts/Ignite/_Contingency", null),
    new VariationModel("stream-referral", "Parts/Ignite/_StreamReferral", null),
    new VariationModel("live-event", "Parts/Ignite/_LiveStream", null, isDefault: true)
  )
}
@Html.Action("_CloudSummit", "Home", true)