I use the version 4 of Umbraco, and wondering if there is a way to render a module from an other module.
say
Root
=> Folder1
=>=> Page1
=>=>=> PageLayout
=>=>=>=> MainContentZone
=>=>=>=>=> MyMainModule
=>=>=>=>=>=> MyChildModule1
=>=>=>=>=>=> MyChildModule2
=>=>=>=>=>=> ...
=>=>=>=>=>=> MyChildModuleX
I would like to iterate over child modules from MyMainModule and display them all. Something like this
@{
var myLayoutHelper = new LayoutHelper(this);
var modules = myLayoutHelper.CurrentModules;
}
@foreach (var mod in modules)
{
<div>
@myLayoutHelper.RenderModule(mod)
</div>
}
Is it possible?