@page "/Admin/Sections" @model SoroushAsadi.Pages.Admin.Sections.SectionsIndexModel @{ Layout = "_AdminLayout"; ViewData["Title"] = "Sections"; var all = new[]{ "hero","services","dataflow","stack","expertise","portfolio","blog","contact","footer" }; }

Sections

@foreach (var key in all) { var hasOverride = Model.OverrideKeys.Contains(key);
@key @if (hasOverride) { customized }
Edit @if (hasOverride) {
}
}