Page 1 of 1

How can I change the project layout?

Posted: Sun Jan 28, 2024 3:19 am
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>

Re: How can I change the project layout.

Posted: Sun Jan 28, 2024 7:51 am
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.


Re: How can I change the project layout.

Posted: Mon Jan 29, 2024 12:47 pm
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