How can I change the project layout?

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
lfernandes
User
Posts: 77

How can I change the project layout?

Post by lfernandes »

I want to change the project layout moving the logo from "Main Sidebar Container" to "Left Navbar Links". How could it be possible to change, could you refer us to an example of code?

   <nav class="@(Config.NavbarClass)">
        <div class="container-fluid">
            <!-- Left navbar links -->
            <a href="@(AppPath())" class="brand-link">
                <img src="~/images/YDUQS_Logo.png" alt="" class="brand-image ew-brand-image">
            </a>
            <ul id="ew-navbar" class="navbar-nav">
                <li class="nav-item d-block">
                    <a class="nav-link" data-widget="pushmenu" data-enable-remember="true" data-ew-action="none"><i class="fa-solid fa-bars ew-icon"></i></a>
                </li>
            </ul>
            <!-- Right navbar links -->
            <ul id="ew-navbar-end" class="navbar-nav ms-auto"></ul>
        </div>
    </nav>
    <!-- /.navbar -->
    <!-- Main Sidebar Container -->
    <aside class="@(Config.SidebarClass)">
        <div class="brand-container">
            <!-- Brand Logo //** Note: Only licensed users are allowed to change the logo ** -->
            @if (Regex.IsMatch(Config.BodyClass, "\bsidebar-mini\b")) {
            <a class="pushmenu mx-1" data-pushmenu="mini" role="button"><i class="fa-solid fa-angle-double-left"></i></a>
            }
        </div>
        <!-- Sidebar -->
        <div class="sidebar">
            <!-- Sidebar user panel -->
            @if (IsLoggedIn()) {
            <div class="user-panel mt-3 pb-3 mb-3 d-flex">
                @if (!Empty(GetClientVar("login", "currentUserName"))) {
                <div class="info">
                    <a class="d-block">@Html.Raw(GetClientVar("login", "currentUserName"))</a>
                </div>
                }
            </div>
            }
            <!-- Sidebar Menu -->
            <nav id="ew-menu" class="mt-2"></nav>
            <!-- /.sidebar-menu -->
        </div>
        <!-- /.sidebar -->
    </aside>

MichaelG
User
Posts: 1110

Post by MichaelG »

You can customize the generated "Views/Shared/_Layout.cshtml" file for the revised layout.

To make the changes permanent so that future generation will not overwrite the layout page, read Customize Template or create an extension.


lfernandes
User
Posts: 77

Post by lfernandes »

I was able to edit the file through the % Appdata % option by accessing the folders: AppData \ roaming \ aspnetmaker2023 \ node_modles \ @aspnetmaker \ aspnet2023 and edit the layout.cshtml file

Thank you for your help


Post Reply