dotCMS - Open Source Content Management System, Ondemand CMS, and Professional Support

Document Search

Article Information

Since Version: 1.6.5
Tags: containers
Updated: 2/17/2010 4:55:20 PM
By: Dean Gonzalez
Doc id: 147119
Print Page: Export to PDF
 

Related Screencasts

Creating Static Content Containers
Learn how to create a Container that allows Content Contributors to add a specific type of content to Containers on HTML pages.

Adding a Container

To add a new Container, click on the "Container" sub-tab in the Website Browser and then click on the "Add Container" button. The image below displays a Container that will allow a maximum of 5 "News Item's".

By default, the "Max. Contents" field is set to zero when adding a new Container. Zero Max Content Containers are typically used for Header and Footer containers that have static HTML/Velocity code in them and do not allow content contribution. If you wish to allow content contribution in the new Container, change the Max. Contents field to a number greater than zero to see the rest of the fields described below.

Add Container

Container Details

  • Identity: This number will be used when creating and editing Templates in the CMS. The number is assigned automatically when a container is created and is unique to each Container.
  • Host: The host to which this Container is assigned. Templates and Containers, however, can be re-used on multiple hosts.
  • Title: Title given to the Container by the user.
  • Description: A short description of the Container. This is displayed only on the back end.
  • Max. Content: The maximum number of pieces of Content that a user can place in a Container. Header and Footer containers are typically set to zero.
  • Content's Structure: Sets the Structure that will be allowed to be used to contribute content to this Container
  • Pre-Loop: This field will contain the HTML used when the Container is parsed. This field will only be processed once, i.e. opening an HTML tag that will stipulate how the content will be formatted within the Container -
    <div class="[ClassName]">
  • Code: The Code entered in this field will be processed for each piece of Content added to the Container (determined by the "Max. Content" field). As shown in the image below, *variable names from the Structure selected for this container can be placed by clicking on the "add variable" button.
    $!{content.Body}
  • Post-Loop: Much like the Pre-Loop, it is processed after the Code field and only once when the Container is processed. Can be used to close the Container, i.e.
    </div>
Container Variables

*The fields within a Structure will be utilized according to their variable name in the Structure. Each variable represents a Field in a Content Structure. To select a variable from a list of available Fields from the Structure, click "add variable" located to the right of the text area. This will pop a new window with all the Fields that make up the Structure that will be used in the designated Container. Clicking "Add | Current Value" under the desired Field Label will add a variable for that Field to the Code field and close the popup window. The steps can be repeated to add more fields.



Post a Comment


Add Comments

   

 
Post