Sitefinity CMS comes with a set of built-in modules, which can be directly used in the pages you create. You can also create your own custom modules and use them side by side with the default ones.
Each Sitefinity CMS module must inherit from the ModuleBase class and override the Install method. In it, add the logic for the actions the module performs when getting added to a Sitefinity CMS site. For example, registering some configuration, creating backend pages, adding widgets and so on.
ModuleBase
Install
You can leverage the Sitefinity VSIX and CLI tools to get started with building custom modules. Both Sitefinity VSIX and Sitefinity CLI enable you to add a new custom module project with the necessary scaffolded module classes, containing inline guidance.
EXAMPLE: To create a general purpose module in Sitefinity CMS, with minimum implementation effort, refer to the sample Database diagnostic module. The module class contains inline documentation for each method used and can guide you into the purpose of each of them.
To facilitate modules decoupling, Sitefinity CMS provides an easy mechanism for installing modules automatically. This way, you can create custom modules, which are installed automatically upon Sitefinity CMS startup. For your module to be discovered and auto-installed at startup, you need to mark it with the SitefinityModuleAttribute assembly attribute.
SitefinityModuleAttribute
While the website is initializing, Sitefinity CMS looks for assemblies in the /bin folder, containing modules marked with this attribute and installs them. The SitefinityModuleAttribute requires you to specify your module name, type, title, description, startup type, module ID, and resource class ID if applicable.
/bin
In addition to the full implementation of the Database diagnostic module, discussed above, below you can find below an example of a dummy Sitefinity module that you can use as a scaffolding for your custom implementations if you prefer to start from scratch:
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important