![]() ![]() That can become handy if we have a plugin that is only used in a specific View, so it would make sense to only include plugin-required scripts only in that View. We have Navbar links and we will render them using the Razor code:Īnd replace it with: "Index", "Home", null, new if the View contains this named section. We are going to edit the App_Start > BundleConfig.cs file a bit later. All this improves the load time of the website. With this feature, we can bundle multiple script/style files into a single file and also minify them. Remove those two lines and replace them what are and They are used to render bundles of scripts and styles defined in App_Start > BundleConfig.cs file.The Second line references the main AdminLTE styles which were added when we copied the content of the dist folder in step 3. We will add this into our project in step 8 and in step 8a. The first line references the styles for FontAwesome icon library. We need to add the razor code inside the tag and the tag. But, there are few lines of Razor code and a few additional lines inside _Layout.cshtml that we still need, so in the next section, we are going to add them back into our new layout.ĥ.) Adding missing Razor code into the new layout Remove everything from _Layout.cshtml and replace it with the content of Starter.html. With the Layout View, we make sure, that we will have a consistent look across our website. It is similar to the ASP.NET master page. Now find the starter.html file and open it in Visual Studio or some other text editor.įor the ASP.NET MVC project, the main layout file is the _Layout.cshtml file, a Layout View located at Views > Shared > _Layout.cshtml. Inside Windows Explorer we need to go up one level from dist folder, so we are at the root "AdminLTE-3.2.0" folder of the extracted files. In the previous step, we copied the content of the dist folder using Windows Explorer into a Visual Studio. We will use the AdminLTE starter page to replace the content of the current layout of the ASP.NET MVC project. 4.) Changing ASP.NET Layout to the one used by AdminLTE Now that we copied the necessary files, let's focus on the Layout of the AdminLTE dashboard. ![]() Whatever technique you used, the ASP.NET project in solution explorer should now look like this: You could also just use drag and drop instead of Copy/Paste. You could right-click on three folders in Windows Explorer and select "Copy" then right-click the adminlte folder in VS solution Explorer and select Paste. ![]() Now, open the Windows Explorer and go inside the dist folder and Copy all three folders into the newly created adminlte folder inside Solution Explorer in Visual Studio. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |