您的位置:首页 > 其它

[DNN模块开发]如何写dnn文件

2005-11-23 16:19 531 查看
在所有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安装文件。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: