@@ -554,9 +554,9 @@ public static class BookTrackingEmbedResourcesConfigurer
554554 {
555555 configuration .Sources .Add (
556556 new EmbeddedResourceSet (
557- " /Views /" ,
557+ " /Resources /" ,
558558 Assembly .GetExecutingAssembly (),
559- " BookTracking.Mvc.Views "
559+ " BookTracking.Mvc.Resources "
560560 )
561561 );
562562 }
@@ -618,8 +618,11 @@ namespace BookTracking.Mvc.Views
618618* Update ` _ViewStart.cshtml ` file in the ` Views ` folder of the ` BookTracking.Mvc ` project.
619619
620620``` csharp
621+ @using Abp .Configuration
622+ @inject SettingManager SettingManager
621623@{
622- Layout = " ~/Areas/App/Views/Layout/default/_Layout.cshtml" ;
624+ var theme = await SettingManager .GetSettingValueAsync (" App.UiManagement.Theme" );
625+ Layout = " ~/Areas/App/Views/Layout/" + theme + " /_Layout.cshtml" ;
623626}
624627```
625628
@@ -631,11 +634,12 @@ Add a new view named `Index.cshtml` in the `Books` folder.
631634
632635@{
633636 ViewData["Title"] = "Home Page";
637+ ViewBag.CurrentPageName = "Books";
634638}
635639
636640@section Scripts
637641{
638- <script src =" ~/Views /Books/Index.js" asp-append-version =" true" ></script >
642+ <script src =" ~/Resources /Books/Index.js" asp-append-version =" true" ></script >
639643}
640644
641645<div class =" app-toolbar py-3 py-lg-6" id =" kt_app_toolbar" >
@@ -804,6 +808,7 @@ First configure csproj file of the `BookTracking.Mvc` project to include the emb
804808``` xml
805809<ItemGroup >
806810 <EmbeddedResource Include =" Views\**\*.*" />
811+ <EmbeddedResource Include =" Resources\**\*.*" />
807812</ItemGroup >
808813```
809814
@@ -859,7 +864,7 @@ Add js files to the `Views/Books` folder.
859864
860865 var _createOrEditModal = new app.ModalManager ({
861866 viewUrl: abp .appPath + ' Books/CreateOrEditModal' ,
862- scriptUrl: abp .appPath + ' Views /Books/_CreateOrEditModal.js' ,
867+ scriptUrl: abp .appPath + ' Resources /Books/_CreateOrEditModal.js' ,
863868 modalClass: ' CreateOrEditBookModal' ,
864869 });
865870
0 commit comments