Containers overview

Containers are used as "boxes" for web parts. They consist of text that is displayed before the web part and after the web part which means they are used as an envelope for web part content. They have two advantages over using the ContentBefore and ContentAfter properties:

 

1.They are re-usable on many web parts.
2.They can contain title and dynamically inserted values of the web part properties.

 

The containers can be managed in Site Manager -> Development -> Web part containers.

 

Container display name

The name of the container displayed to the users.

Container code name

The name of the container used in the code.

Text before web part

Text displayed before web part - the beginning of the envelope.

Text after web part

Text displayed after web part - the closing of the envelope.

 

The Text before/after web part value can contain dynamically inserted values of the web part properties. You can insert them using the following expression:

 

{%propertyname%}

 

You will most often use the following expression to insert the container title:

 

{%ContainerTitle%}

 

These macro expressions are resolved even when macro resolving for the particular web part (Disable macros property) is disabled.

 

Here's an example of web part without container:

 

clip0635

 

Here's an example of the same web part with container:

 

clip0636