Hi,
I am trying to write a carousel slider. I looked at the sample codes. there is a structure like below:
I tried to call ComponentWidget or PartialViewWidget, there is content_before in zone
neither PartialViewWidget nor ComponentWidget is called when I open the homepage. what am I missing ?
namespace Smartstore.Carousel { internal class Module : ModuleBase, IConfigurable, IActivatableWidget { public RouteInfo GetConfigurationRoute() => new("Configure", "CarouselAdmin", new { area = "Admin" }); public Widget GetDisplayWidget(string widgetZone, object model, int storeId) => new PartialViewWidget("PublicInfo", model); //=> new ComponentWidget(typeof(CarouselViewComponent), new { widgetZone, model, storeId }); public string[] GetWidgetZones() => new string[] { "content_before","main_column_before" }; public override async Task InstallAsync(ModuleInstallationContext context) { // Saves the default state of a settings class to the database // without overwriting existing values. await TrySaveSettingsAsync<CarouselSettings>(); // Imports all language resources for the current module from // xml files in "Localization" directory (if any found). await ImportLanguageResourcesAsync(); // VERY IMPORTANT! Don't forget to call. await base.InstallAsync(context); } public override async Task UninstallAsync() { // Deletes all "MyGreatModuleSettings" properties settings from the database. await DeleteSettingsAsync<CarouselSettings>(); // Deletes all language resource for the current module // if "ResourceRootKey" is module.json is not empty. await DeleteLanguageResourcesAsync(); // VERY IMPORTANT! Don't forget to call. await base.UninstallAsync(); } } }