I have finished developing my module for dotnetnuke, but I need to have my controls pages already added after the module is installed instead of adding all the control pages myself
2 Answers
Found my answer:
In the solution explorer, there is a file that is called the name of your module with the file extension of dnn. Ex: MyModule.dnn
Open that and look for the tag <moduleControl>
. From there you can create your own control that will be added during the installation process.
Here is my example:
<moduleControl>
<controlKey>GestionCategories</controlKey>
<controlSrc>DesktopModules/DemandePosteEnLigne/GestionCategories.ascx</controlSrc>
<supportsPartialRendering>False</supportsPartialRendering>
<controlTitle>Gestion des Categories</controlTitle>
<controlType>Edit</controlType>
<iconFile />
<helpUrl />
<viewOrder>0</viewOrder>
<supportsPopUps>True</supportsPopUps>
</moduleControl>
There is no event in dnn like OnModuleInstalled
or something. But you can achieve what you want to do by creating page template/ portal template based on your requirements.
If you are willing to create 2-3 new pages, you can simply export those pages as template and then you can use dnn file manager to upload the page templates and then use those page templates to create pages. Good thing about this is, in future also, if you want to create similar pages, you can re-use those templates.
If you are willing to create entire portal's page hierarchy which includes more than 5 pages, you need to go for portal template. You can export portal as template by login to host account and go to Host > Portals (Site Management). You have to upload your portal template through FTP and then you have to create your new template by using that template.
Let me know if you need any other help.
Thanks

- 5,758
- 5
- 25
- 39
-
thanks, but creating a template isnt what I'm looking for... To create the template, I still need to preinstall the module and add the control pages manually after the installation – Zarichney Jul 25 '12 at 12:43
-
As I said, that is not possible through any inbuilt feature in dnn. You have to write some custom code to do so. – Prashant Lakhlani Jul 25 '12 at 13:10