Soon OdinCMS and OdinSTORE are on the way — be the first to know. Join the list
OdinZero
Get Pro Live preview
  1. Home page
  2. Help center
  3. Installation

Use with ASP.NET

Put the assets in wwwroot/ and turn a page into _Layout.cshtml.

  1. Copy css/, js/ and images/ into wwwroot/odinadmin/.
  2. Turn any page into Views/Shared/_Layout.cshtml: keep the shell and put @RenderBody() inside .content.
  3. Link the files with ~/ paths, and let ASP.NET add a version for you:
    <link rel="stylesheet" href="~/odinadmin/css/style.css" asp-append-version="true" />
    <script src="~/odinadmin/js/app.js" asp-append-version="true"></script>
  4. Move the sidebar into a partial view (<partial name="_Sidebar" />) and mark the current link from the route.

Page scripts go in @section Scripts { … }, rendered after app.js with @RenderSection("Scripts", required: false).

Back to the help center