Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @inherits UmbracoViewPage<dynamic>
- @if (Model != null && Model.sections != null)
- {
- bool oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
- <div class="umb-grid">
- @if (oneColumn)
- {
- foreach (var section in Model.sections)
- {
- foreach (var row in section.rows)
- {
- @renderRow(row);
- }
- }
- }
- else
- {
- <div class="columns">
- @foreach (var s in Model.sections)
- {
- <div class="column is-@s.grid">
- @foreach (var row in s.rows)
- {
- @renderRow(row);
- }
- </div>
- }
- </div>
- }
- </div>
- }
- @helper renderRow(dynamic row)
- {
- <div class="columns">
- @foreach (var area in row.areas)
- {
- <div class="column is-@area.grid">
- @foreach (var control in area.controls)
- {
- if (control != null && control.editor != null && control.editor.view != null )
- {
- <text>@Html.Partial("grid/editors/base", (object)control)</text>
- }
- }
- </div>
- }
- </div>
- }
Add Comment
Please, Sign In to add comment