Posted on 30/04/2020 15:39:13
Hi Mario,
You can use one of the icons found in Settings > Developer > List of all known icons
There are two ways to add an icon to your module.
A) Execute SQL update script on the Module table
Example:
UPDATE [Module] SET [ModuleIconClass] = "Umbrella" WHERE [ModuleSystemName] = "MyCustomModule"
Replace the values to match your module.
B) Use module annotations
Example:
using Dynamicweb.Core.UI.Icons;
using Dynamicweb.Modules;
using Dynamicweb.Modules.Annotations;
namespace Dynamicweb.Examples
{
[ModuleName("ModuleSystemName", "Module name")] // Required.
[ModuleDescription("Some description of thís module")] // Optional.
[ModuleIcon(KnownIcon.Tasks)] // Optional. The name of a known icon in Dynamicweb which will be displayed in the management UI. See documentation for details.
[ModuleEditPanel("/CustomModules/ModuleSystemName/ModuleSystemName_Edit.ascx")] // Optional. Path to the module edit panel of this module (.ascx or .aspx).
[ModuleControlPanel("/CustomModules/ModuleSystemName/ModuleSystemName_ControlPanel.aspx")] // Optional. Path to the control panel of this module (.aspx).
[ModuleScriptPanel("/CustomModules/ModuleSystemName/ModuleSystemName_Admin.aspx")] // Optional. Full path to the management panel of this module (.aspx).
[ModuleAccess(true)] // Optional. Setting this to false will disable this module by default. Default value is true.
public class ContentModuleWithAnnotationsSample : ContentModule
{
public override string GetContent()
{
return "Hello world";
}
}
}
Best regards,
Morten