(Quick Reference)



Executes the body only if there is content explicitly defined for the specified content zone.

Content zones can have optional content, and if the application's GSP definescontent for a zone, you can check this.

For example your theme may render alternative content on the "sidebar" layout if there is no content defined for the sidebar, and render the sidebar decoration if there is some content.

This can be used within Theme layouts and application/plugin GSPs.


<theme:ifZoneContent name="panel1">
    <div class="leftpanel">
        <theme:layoutZone name="panel1"/>

<theme:ifZoneContent name="panel2">
    <div class="centerpanel">
        <theme:layoutZone name="panel2"/>

<theme:ifZoneContent name="panel3">
    <div class="rightpanel">
        <theme:layoutZone name="panel3"/>

The above allows the application developer to define only the panels they require, and no content will be rendered if they have not defined some of them.


nameYesThe name of the zone that you wish to test for content