There is a way to achieve what you want, and the mentioned marketplace component uses it, however, we do not recommend it.
There are two methods you implement in each module - Initialize() and Install(). The first one is called on each application start, the second one just once. Usually we recommend people to perform the setup work in Install().
If you use the Initialize() method (or alternatively subscribe to the Initialized event of the Bootstrapper, like in Global.asax), you can skip the registration step. There are a couple of things wrong with this:
- Bad performance - on each start, you have to make a database request to see if you have already created the backend pages, and if not, create them.
- Unsupported upgrades - you module is doing something too early in the app lifecycle and in case it needs to upgrade from a previous version of the module, it can't know the difference. It will just skip the creation of a page (rather than modify the already created page). The sitemap generator in the marketplace has no data to persist, so this problem is only partial (no ability to update the backend page)
- Deviation from the practice of module creation. If we change something in the product, we might break such a scenario, just because we never supported it officially. With the approved approach through the install() method, we will always make sure not to break custom modules.
If you think the benefit of pseudo-automatic installation outweighs the disadvantages above, you can go down this road, but again - we don't recommend this for normal custom modules.
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items