Access of the container variables

 

Current container

Following container attributes are defined in template:

Name: leftcolumn
Type: side
Width: 230
Max Elements: 5

 

Container page

  • Locale: en
  • Container Names:
    • leftcolumn
    • rightcolumn
    • centercolumn
  • Container Types:
    • center
    • side
 

Element Mode:

Mode: false

The element mode is true, if the element have been moved or edited, but the page have not been reloaded yet.
The element mode is false, if the element have not been changed since the last reload of the page.

Access of the container variables

 

Current container

Following container attributes are defined in template:

Name: rightcolumn
Type: side
Width: 230
Max Elements: 8

 

Container page

  • Locale: en
  • Container Names:
    • leftcolumn
    • rightcolumn
    • centercolumn
  • Container Types:
    • center
    • side
 

Element Mode:

Mode: false

The element mode is true, if the element have been moved or edited, but the page have not been reloaded yet.
The element mode is false, if the element have not been changed since the last reload of the page.

Access of the container variables

Specific information about differnet containers on a container page as well as adjusted information of a container element is provided by org.opencms.jsp.util.CmsJspStandardContextBean. This bean is available from a jsp like formatter, as soon as the container page is rendered. The values of the bean are adjusted depending on the element it is called from. In order to access the CmsJspStandardContextBean from a jsp use a predefined EL variable ${cms}.

In this demo different variables available inside of the current element are displayed. These variables describe the current state of the container page and of the current container.
Please check the following jsp to learn more about the source code:
/system/modules/org.opencms.dev.demo/pages/containervars.jsp

 

Current container

Following container attributes are defined in template:

Name: centercolumn
Type: center
Width: 450
Max Elements: 6

 

Container page

  • Locale: en
  • Container Names:
    • leftcolumn
    • rightcolumn
    • centercolumn
  • Container Types:
    • center
    • side
 

Element Mode:

Mode: false

The element mode is true, if the element have been moved or edited, but the page have not been reloaded yet.
The element mode is false, if the element have not been changed since the last reload of the page.