[DNN模块开发]如何写dnn文件
[DNN模块开发]如何写dnn文件 在所有DNN模块的安装包中,都有一个*.DNN文件。这个文件就是DNN模块的安装文件清单。在安装模块时DNN应用程序读取该文件,按照文件清单中的内容安装相关文件和数据库脚本。
DNN文件是一个XML文件结构大致如下:
<!--dotnetnuke节点,说明改文件时模块安装清单,使用与3.0.X版的DNN程序-->
<dotnetnuke version='3.0' type='Module'>
<folders>
<folder>
<!--模块名称-->
<name>CLinks</name>
<!--模块名称(模块的友好名称)-->
<friendlyname>CLinks</friendlyname>
<!--模块功能描述-->
<description>分类链接模块</description>
<!--模块版本-->
<version>01.00.00</version>
<!--业务逻辑类-->
<businesscontrollerclass>DNNChina.Modules.CLinks.CLinksController, DNNChina.Modules.CLinks</businesscontrollerclass>
<modules>
<module>
<friendlyname>CLinks</friendlyname>
<!--模块所包含的控件-->
<controls>
<!--显示控件-->
<control>
<src>DesktopModules/CLinks/CLinks.ascx</src>
<type>View</type>
</control>
<!--编辑控件-->
<control>
<key>Edit</key>
<title>Edit CLinks</title>
<src>DesktopModules/CLinks/EditCLinks.ascx</src>
<type>Edit</type>
</control>
<!--设置控件-->
<control>
<key>Settings</key>
<title>Settings CLinks</title>
<src>DesktopModules/CLinks/Settings.ascx</src>
<type>Edit</type>
</control>
</controls>
</module>
</modules>
<!--需要安装的文件清单-->
<files>
<!--程序集文件-->
<file>
<name>DNNChina.Modules.CLinks.dll</name>
</file>
<file>
<name>DNNChina.Modules.CLinks.SqlDataProvider.dll</name>
</file>
<!--用户控件文件-->
<file>
<name>CLinks.ascx</name>
</file>
<file>
<name>EditCLinks.ascx</name>
</file>
<file>
<name>Settings.ascx</name>
</file>
<!--语言包文件-->
<file>
<path>App_LocalResources</path>
<name>CLinks.ascx.resx</name>
</file>
<file>
<path>App_LocalResources</path>
<name>CLinks.ascx.zh-CN.resx</name>
</file>
<file>
<path>App_LocalResources</path>
<name>EditCLinks.ascx.resx</name>
</file>
<file>
<path>App_LocalResources</path>
<name>EditCLinks.ascx.zh-CN.resx</name>
</file>
<file>
<path>App_LocalResources</path>
<name>Settings.ascx.resx</name>
</file>
<file>
<path>App_LocalResources</path>
<name>Settings.ascx.zh-CN.resx</name>
</file>
<!--数据库安装脚本-->
<file>
<name>01.00.00.SqlDataProvider</name>
</file>
<!--数据库卸载脚本-->
<file>
<name>Uninstall.SqlDataProvider</name>
</file>
</files>
</folder>
</folders>
</dotnetnuke>
大家在开发模块时,可以照此结构编写自己需要的DNN安装文件。
相关内容:
模块的文件结构及命名方法:
http://www.cnblogs.com/esshs/archive/2005/07/21/197198.html
更多相关内容>>
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。