I have a rendering that calls its datasources children. Each child item has a rendering attached in the renderings field. I am calling
@Html.Sitecore().ItemRendering(item)
Which works.
However I want to pass some parameters to the child's rendering, so I tried the following code;
@Html.Sitecore().ItemRendering(item, new { Parameters = "active=1" })
But the parameters do not get passed to the child rendering when I call @Html.Sitecore().CurrentRendering.Parameters["active"]
So I tried @Html.Sitecore().ItemRendering(item, new { Active = 1 })
. I called it again in the child rendering and still no luck.
Is there a way to pass parameters to the child using @Html.Sitecore().ItemRendering()
In the rendering for the Item, you can access the viewdata like this: