Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
The A container is defined a markup element in a layout at a place, where dynamic content should appear.

To each container of a layout modules can be assigned to be rendered. This assignment is saved in the Template.

 

...

. It serves as a placeholder for a module that can be inserted using a template. Container is a systemwide ressource.

In order to add a new container to your layout, you must have to add its syntax markup right at the place, you later want to output dynamic content.

Container element

The syntax of a container is HTML like the following.XML as follows:

Code Block
languagehtml/xml
<container id="ID" name="NAME">Default</container>

The container element can be configured with more, optional attributes.

Attribute name Description
id
requiredEach container needs

...

a numeric ID, which

...

has to be unique

...

for the

...

layout. This ID is important, so modules can be assigned clearly. Usually these IDs are multiples of ten so that additional container can be inserted afterwards without interfering with other containers.
name
requiredThe name of the container should be short and descriptive. It is displayed in the template

...

overview to help you, where your module is assigned.
types
optionalThe attribute "

...

The container element can be configured with more, optional attributes.

 

Attribute nameDescription
modetypes" may contain a comma separated list of module types. You then can only assign modules of the apropriate type(s) to this container.
default
optionalThe attribute "default" can contain the name of the module, which is assigned per default to this container.
mode
optionalThe "mode" parameter with the value "fixed" can fix a the default module to its the container, so no other modules can be assigned to this container.types

The

...

"

...

content" of the container element later gets replaced by the output of the module you have assigned to it. The content of this element is only displayed on the template preview page. This can be used to check the functionality of your layout and prevent errors.

Note
titlePlease check if this still is true
  • Both tags of the container element have to be located on the same line.
  • The ID attribute has to be the first attribute.