@using TightWiki.Models @model TightWiki.Models.ViewModels.Admin.MenuItemViewModel @{ Layout = "/Views/Shared/_Layout.cshtml"; var sessionState = ViewData["SessionState"] as TightWiki.SessionState ?? throw new Exception("Wiki State Context cannot be null."); }

Site Menu Item

Global configuration for the site menu item.

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) {
@Html.Raw(Model.ErrorMessage)
} @if (!string.IsNullOrEmpty(Model.SuccessMessage)) {
@Html.Raw(Model.SuccessMessage)
} @using (Html.BeginForm(null, null, FormMethod.Post, new { action = $"{GlobalConfiguration.BasePath}{Context.Request.Path}" })) { @Html.AntiForgeryToken() @Html.HiddenFor(m => m.Id)
@Html.TextBoxFor(m => m.Name, new { @class = "form-control", placeholder = "required" })
@Html.ValidationMessageFor(m => m.Name)
@Html.TextBoxFor(m => m.Link, new { @class = "form-control", placeholder = "required" })
@Html.ValidationMessageFor(m => m.Link)
@Html.TextBoxFor(m => m.Ordinal, new { @class = "form-control", placeholder = "required" })
@Html.ValidationMessageFor(m => m.Ordinal)
}