DotNetNuke Skinning – Containers

Today we move our focus to DotNetNuke containers. Not because we are done with skins, but because we can’t go any further in our discussion of skinning until we cover containers.


As with skins, we need to be able to specify where the module should be located that the container will hold. We do this with a tag that will look very similar to a tag we used in the skin:

<div id="ContentPane" runat="server">
</div>

Note: the DIV tag could very easily be any tag that surrounds content, like the TD tag, just like we were able to do in the skin.

If you’ve been around DotNetNuke for any length of time, you already know that containers also have the ability to display a drop-down menu for administrators, Links for RSS feeds and printing, expand and collapse functionality, as well as many other lesser-known features. This functionality is added to a container using Container Objects. Container Objects work similarly to Skin objects in that they are bits of ASP.NET user control fragments that get added into our ASCX file to tell it to add a specific functionality.

ASP.NET Code Description
<%@ Register TagPrefix="dnn"
    TagName="ActionButton"
    Src="~/Admin/Containers/ActionButton.ascx" %>

<dnn:ActionButton
runat="server"
id="dnnActionButton">

This displays a button or icon, controlled by the attributes, for the various actions that are available to a DotNetNuke module:

  • AddContent
  • EditContent
  • ContentOptions
  • SyndicateModule
  • ImportModule
  • ExportModule
  • OnlineHelp
  • ModuleHelp
  • HelpText
  • PrintModule
  • ModuleSettings
  • DeleteModule
  • ClearCache
  • MoveTop
  • MoveUp
  • MoveDown
  • MoveBottom
  • MovePane
  • MoveRoot

The most common actions used with this tag are:

  • AddContent
  • EditContent
  • SyndicateModule
  • PrintModule
<%@ Register TagPrefix="dnn"
    TagName="DropDownActions"
    Src="~/A...rs/DropDownActions.ascx" %>

<dnn:DropDownActions
runat="server"
id="dnnDropDownActions" />

This tag displays a drop-down list box with all of the actions available listed in it.
<%@ Register TagPrefix="dnn"
    TagName="Icon"
    Src="~/Admin/Containers/Icon.ascx" %>

<dnn:Icon runat="server"
id="dnnIcon" />

Displays the icon assigned to the module.
<%@ Register TagPrefix="dnn"
    TagName="LinkActions"
    Src="~/Admin/Containers/LinkActions.ascx" %>

<dnn:LinkActions
runat="server"
id="dnnLinkActions" />

Displays actions as hyperlinks in a horizontal list.
<%@ Register TagPrefix="dnn"
    TagName="SolPartActions"
    Src="~/A...ers/SolPartActions.ascx" %>
<dnn:SolPartActions
runat="server"
id="dnnSolPartActions" />

Displays the triangle for the module context menu that has all the actions. This is the triangle we are most often used to seeing represent the actions for a module and is probably the one you will use.
<%@ Register TagPrefix="dnn"
    TagName="Title"
    Src="~/Admin/Containers/Title.ascx" %>

<dnn:Title runat="server"
id="dnnTitle" />

This displays the title of a particular instance of a module as specified in module settings.
<%@ Register TagPrefix="dnn"
    TagName="Visibility"
    Src="~/Admin/Containers/Visibility.ascx" %>

<dnn:Visibility
runat="server"
id="dnnVisibility">

Displays an icon that represents the expanded or collapsed state of the module. Clicking on the icon switches the state.

Most of these tags have additional attributes that control how the control will look when it is displayed. You can find more information in the DotNetNuke Skinning PDF that is part of the documentation ZIP file that you can download from the DotNetNuke site.

Like this Article? Subscribe to get every article sent to your email.

Related Post

  • DotNetNuke – SkinningDotNetNuke – Skinning Today I'm going to start a separate series on Skinning DotNetNuke. Don't worry, I'm still planning to continue the series on creating modules. Later on, I may start a series on something […]
  • DotNetNuke Skins – ASCX vs HTML modeDotNetNuke Skins – ASCX vs HTML mode I got a question yesterday from a designer who is unfamiliar with ASP.NET asking what the difference is between ASCX mode and HTML mode when developing skins and containers for […]
  • DotNetNuke Modules – Creating Base ModulesDotNetNuke Modules – Creating Base Modules Now that we have DotNetNuke installed into Visual Studio we can go ahead and create our first modules. Actually, creating the modules is pretty simple. But it is even easier to do it […]
  • DotNetNuke Skinning – Getting Set UpDotNetNuke Skinning – Getting Set Up While it IS possible to create DotNetNuke skins and containers using a standard HTML editor and HTML files, I find that it is much easier to use Visual Studio and ASCX files instead. The […]
  • DotNetNuke Skinning – Collapsible ContainersDotNetNuke Skinning – Collapsible Containers One feature you'll see in DotNetNuke containers is the ability to collapse the container using an icon, typically in the upper right hand corner of the container. Implementing collapsible […]

About Dave Bush

Dave Bush is a .NET programmer and Certified ScrumMaster who is passionate about managing risk as it relates to developing software. When he is not writing or speaking about topics related to Application Lifecycle Risk Management (ALRM), he is an example to his peers as he develops web sites in the ASP.NET environment using industry best practices.

Awards & Certs


Links