DotNetNuke Skinning Whitepaper 翻译记录(容器创建部分)

 

容器的创建

 

根据早期的想法,容器也属于一种可以应用于内容模块的皮肤定义。容器如皮肤一样被精确的定义其外观,不同的是两者的设置是不一样的。

 

比起皮肤唯一额外的限制是在创建容器时行为控件必须被包含在容器的皮肤。行为控件是DotNetNuke一个新的特性,它扮演一个将内容模块功能性与门户框架连接起来的角色。行为控件实质上是一个让内容模块功能性表现出来的一个用户界面控件。它的主要功能包括:能够管理模块在内容栏目中的位置,能够编辑模块的设置。同时具有对特定模块自定义的功能的能力,允许用户编辑内容以及导航到其它控件。在DotNetNuke 中有许多这样的行为控件。默认的行为控件是SolPartActions 控件,当你的鼠标移动到默认容器的左上角时它可以弹出一个下拉菜单。这个控件对于高版本的浏览器来说无疑是合适的,但由于低版本的浏览器无法支持这个弹出特性,我们同时采用了一个DropDownActions 控件,他可以在低版本的浏览器中表现出下拉框。

 

虽然皮肤和容器被单独的创建,打包以及配置,但还是需要有意识的将它们结合在一起。当然,这可以通过上传机制来实现并将它们应用于网站的用户界面。这样的操作只是一个简单的过程,你的用户界面还会有很大的间隔,因为大家都知道栏目在皮肤还是可见的。栏目级的设置只能在皮肤设计者设计皮肤的时候加以设置,包括在栏目使用自定义属性来增加栏目的功能。可以使用容器类型,容器名称和容器的地址这些属性来定义将要使用在所有模块的容器。为了使其正常工作,这些特殊容器必须放置在一个特殊的位置,否则将显示默认的容器。

 

<Objects>

  <Object>

      <Token>[CONTENTPANE:1]</Token>

      <Settings>

         <Setting>

             <Name>ID</Name>

             <Value>LeftPane</Value>

         </Setting>

         <Setting>

             <Name>ContainerType</Name>

             <Value>G</Value>

         </Setting>

         <Setting>

             <Name>ContainerName</Name>

             <Value>DNN</Value>

         </Setting>

         <Setting>

             <Name>ContainrSrc</Name>

             <Value>standard.ascx</Value>

         </Setting>

      </Settings>

  </Object>

</Objects>

 

2.0版本之前,DotNetNuke拥有一些有限的模块容器功能,允许管理者使用HTML来给内容模块提供自定义的边框或者轮廓。这种容器的观念有很多问题,比如提供的图形存储于站点的上传文件夹,每次请求都必须分析一次HTML来将它们结合在一起,而且表现也是完全静态表现。然而虽然有这些限制,还是有许多容器包被创建和发布。为了管理和维护这些容器,一个用来将容器图片放在它们专属的一个子文件夹并提供一个选择机制的第三方插件被发布。好消息是现在,将这些最早的容器转换并融入新的DotNetNuke 皮肤体系只需要做一点细微的修改。(更多详细信息请参考附录C

 

Container Creation

 

As mentioned earlier, containers are skin definitions which can be applied to content modules. A container is defined in exactly the same manner as a skin except for the fact that there are a different set of skin objects used in containers. 

 

The only extra restriction when creating containers is that an Actions control must be included in the container skin. The Actions control is a new feature in DotNetNuke which acts as the glue that ties the content module functionality to the portal framework. The Actions control is essentially a user interface control which exposes the content module functionality. General functions include the ability to edit module settings as well as the ability to manage the positioning of modules within skin content panes. Custom functions related to a specific module are also exposed, allowing you to edit content and navigate to other controls. There are a number of Actions controls included with DotNetNuke. The default actions control is the SolPartActions control which behaves as a popup menu when you hover over the edit icon in the upper left corner of the default container skin. Since this action control is best suited for higher level browsers, there is also a DropDownActions control which behaves like a simple dropdown combobox for downlevel browsers.

 

Although skins and containers are created, packaged, and deployed independently, it is very likely that you will create a skin and container combination which are intended to work together. Of course this can be accomplished by uploading both the skin and the container and then applying them to your portal user interface. To simply this operation and provide a higher degree of granularity, a concept known as Pane Level skinning is also available. Pane level skinning can only be configured at design-time when the skin designer constructs the skin. It involves the use of some custom attributes which can be included in the markup for the pane. The ContainerType, ContainerName, and ContainerSrc attributes can be used to identify a specific container to be used with all modules injected into the pane. In order for this to work correctly, the container must exist in the location specified otherwise the default container will be displayed.

 

<Objects>

  <Object>

      <Token>[CONTENTPANE:1]</Token>

      <Settings>

         <Setting>

             <Name>ID</Name>

             <Value>LeftPane</Value>

         </Setting>

         <Setting>

             <Name>ContainerType</Name>

             <Value>G</Value>

         </Setting>

         <Setting>

             <Name>ContainerName</Name>

             <Value>DNN</Value>

         </Setting>

         <Setting>

             <Name>ContainrSrc</Name>

             <Value>standard.ascx</Value>

         </Setting>

      </Settings>

  </Object>

</Objects>

 

In versions prior to 2.0, DotNetNuke contained a limited module container skin functionality which allowed the Administrator to wrap a content module in some HTML markup to provide a custom border or outline. This container concept had a variety of issues including the fact the supporting graphics were stored in the same portal upload folder, the associated HTML required parsing on every request, and the layout was completely static. Even with these limitations, the popularity of containers resulted in the creation and distribution of many container packages. And to help manage these containers, a third party enhancement was released which separated the container graphics into their own subfolders and provided a simple selection mechanism. The good news is that the conversion of these original containers to the new DotNetNuke skinning architecture is minimal ( see Appendix C for more information ).

DotNetNuke Skinning Whitepaper 翻译记录:
DotNetNuke Skinning Whitepaper 翻译记录(简介部分)
DotNetNuke Skinning Whitepaper 翻译记录(术语与win客户端程序部分)
DotNetNuke Skinning Whitepaper 翻译记录(技术部分)
DotNetNuke Skinning Whitepaper 翻译记录(定义部分--大厨师翻译)
DotNetNuke Skinning Whitepaper 翻译记录(DotNetNuke部分)
DotNetNuke Skinning Whitepaper 翻译记录(总揽部分)
DotNetNuke Skinning Whitepaper 翻译记录(文件组织部分--大厨师翻译)
DotNetNuke Skinning Whitepaper 翻译记录(页面处理部分)
DotNetNuke Skinning Whitepaper 翻译记录(皮肤包部分)

DotNetNuke Skinning Whitepaper 翻译记录(皮肤定义部分)

Container Creation

 

As mentioned earlier, containers are skin definitions which can be applied to content modules. A container is defined in exactly the same manner as a skin except for the fact that there are a different set of skin objects used in containers. 

 

The only extra restriction when creating containers is that an Actions control must be included in the container skin. The Actions control is a new feature in DotNetNuke which acts as the glue that ties the content module functionality to the portal framework. The Actions control is essentially a user interface control which exposes the content module functionality. General functions include the ability to edit module settings as well as the ability to manage the positioning of modules within skin content panes. Custom functions related to a specific module are also exposed, allowing you to edit content and navigate to other controls. There are a number of Actions controls included with DotNetNuke. The default actions control is the SolPartActions control which behaves as a popup menu when you hover over the edit icon in the upper left corner of the default container skin. Since this action control is best suited for higher level browsers, there is also a DropDownActions control which behaves like a simple dropdown combobox for downlevel browsers.

 

Although skins and containers are created, packaged, and deployed independently, it is very likely that you will create a skin and container combination which are intended to work together. Of course this can be accomplished by uploading both the skin and the container and then applying them to your portal user interface. To simply this operation and provide a higher degree of granularity, a concept known as Pane Level skinning is also available. Pane level skinning can only be configured at design-time when the skin designer constructs the skin. It involves the use of some custom attributes which can be included in the markup for the pane. The ContainerType, ContainerName, and ContainerSrc attributes can be used to identify a specific container to be used with all modules injected into the pane. In order for this to work correctly, the container must exist in the location specified otherwise the default container will be displayed.

 

<Objects>

  <Object>

      <Token>[CONTENTPANE:1]</Token>

      <Settings>

         <Setting>

             <Name>ID</Name>

             <Value>LeftPane</Value>

         </Setting>

         <Setting>

             <Name>ContainerType</Name>

             <Value>G</Value>

         </Setting>

         <Setting>

             <Name>ContainerName</Name>

             <Value>DNN</Value>

         </Setting>

         <Setting>

             <Name>ContainrSrc</Name>

             <Value>standard.ascx</Value>

         </Setting>

      </Settings>

  </Object>

</Objects>

 

In versions prior to 2.0, DotNetNuke contained a limited module container skin functionality which allowed the Administrator to wrap a content module in some HTML markup to provide a custom border or outline. This container concept had a variety of issues including the fact the supporting graphics were stored in the same portal upload folder, the associated HTML required parsing on every request, and the layout was completely static. Even with these limitations, the popularity of containers resulted in the creation and distribution of many container packages. And to help manage these containers, a third party enhancement was released which separated the container graphics into their own subfolders and provided a simple selection mechanism. The good news is that the conversion of these original containers to the new DotNetNuke skinning architecture is minimal ( see Appendix C for more information ).

DotNetNuke Skinning Whitepaper 翻译记录:
DotNetNuke Skinning Whitepaper 翻译记录(简介部分)
DotNetNuke Skinning Whitepaper 翻译记录(术语与win客户端程序部分)
DotNetNuke Skinning Whitepaper 翻译记录(技术部分)
DotNetNuke Skinning Whitepaper 翻译记录(定义部分--大厨师翻译)
DotNetNuke Skinning Whitepaper 翻译记录(DotNetNuke部分)
DotNetNuke Skinning Whitepaper 翻译记录(总揽部分)
DotNetNuke Skinning Whitepaper 翻译记录(文件组织部分--大厨师翻译)
DotNetNuke Skinning Whitepaper 翻译记录(页面处理部分)
DotNetNuke Skinning Whitepaper 翻译记录(皮肤包部分)

DotNetNuke Skinning Whitepaper 翻译记录(皮肤定义部分)

你可能感兴趣的:(dotnetnuke)