I have created a plugin and it loads correctly and shows up in my Local Plugins page. I have a Class1.cs file inside my plugin project. How do I make my plugin update only the homepage title tag?
I have a view for my plugin configure.cshtml and have this code:
@{ var Route=HttpContext.Current.Request.RequestContext.RouteData; var controllerName = Route.Values["controller"].ToString(); var actionName =Route.Values["action"].ToString(); var isHomePage = false; if (controllerName == "Home" && actionName == "Index") { isHomePage = true; Html.AddTitleParts("Welcome to the main page"); } }
Well, configure page is for administration, to set something which should be executed from PublicInfo.cshtml Maybe first, you would be able to set any text in one of system widget zones, instead of removing any part of the page? Also have a look on NivoSlider plugin, which is available also with source code - you may learn from this how to make first steps as nopCommerce plugin developer.
I am able to output text on the page using the H1 but still unable to override the title tag. I can even get script tags to output using Html.AddScriptParts(). Here is my code: