Create a Container

Create a Container

  • Platform
  • Evoq Content
  • Evoq Engage

A container is similar to a layout template, except a container's scope is a single pane, whereas a layout template's scope is the entire page. A container is associated with a module, which can generate dynamic content or perform other functionality.

Containers allow designers to seamlessly integrate modules from many different developers into a cohesive website design. Containers can also include visual elements that allow website users to interact with the module.

  • You can have a default container, which would be overridden by individual panes or modules if they provide their own style definitions.
  • You can use different containers in a single page.
  • You can mix and match any container with any CSS.

Prerequisites

A local DNN installation with Host permissions.

Steps

  1. Create a new file for the container.
    Note:
    • The container must contain exactly one pane called ContentPane.
    • The single pane must be defined as a server control by adding runat="server" to the element.
    • A pane can be one of the following HTML elements: <td> (table cells), <div>, <p>, and <span>.
    • (Optional) You can add the attribute visible="false" to the pane to prevent it from being displayed if no module is assigned to it.
    A very basic container in HTML.
    
        <div id="ContentPane" runat="server"></div>
                        
    A very basic container in ASCX.
    
        <%@ Control AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Containers.Container" %>
        <div id="ContentPane" runat="server"></div>
                        
  2. (Optional) Add theme objects to your container for a more dynamic page.

    The following theme objects are relevant to containers:

    ACTIONBUTTON Displays an action from the module action menu.
    ACTIONBUTTON Displays an action from the module action menu.
    DROPDOWNACTIONS Displays the module action menu as a dropdown list.
    ICON Displays the module icon.
    PRINTMODULE Displays a link for the Print action from the module action menu.
    TITLE Displays the module title.
    VISIBILITY Displays a visibility control for the module allowing users to show or hide a given module on the page.

Comments

0 comments

Please sign in to leave a comment.