Since Sitecore Habitat has been released I was looking for a Helix based solution which can be use for Greenfield project. Once again – Habitat is only an example of project implementing Helix architecture. I looked at Helixbase and I tried to implement one of bootstrap free template sites to evaluate it as a candidate.
I thought it would be nice to add automatically to the menu new section item each time that editor is adding a new one and create an anchor to that section.
@model RenderingModel @{ var currentItem = Sitecore.Context.Item; RenderingReference[] myRenderings = currentItem.Visualization.GetRenderings(Sitecore.Context.Device, true); var layoutField = new LayoutField(currentItem); LayoutDefinition layoutDef = LayoutDefinition.Parse(layoutField.Value); DeviceDefinition deviceDef = layoutDef.GetDevice(Sitecore.Context.Device.ID.ToString()); string sectionId = string.Empty; } <!-- Collect the nav links, forms, and other content for toggling --><!-- /.navbar-collapse -->