25.3.2. How to use a Layout

25.3.2.1. Declarative use

Portals and pages can be configured to use a particular layout. The connection to the desired layout is made in the portal descriptor (YourNameHere-object.xml). Here is an example of such a portal descriptor:
<portal>
   <portal-name>default</portal-name>
   <properties>
      <!-- Set the layout for the default portal -->
      <!-- see also portal-layouts.xml -->
      <property>
         <name>layout.id</name>
         <value>phalanx</value>
      </property>
   </properties>
   <pages>
      <page>
         <page-name>theme test</page-name>
         <properties>
            <!-- set a difference layout for this page -->
            <property>
               <name>layout.id</name>
               <value>industrial</value>
            </property>
         </properties>
      </page>
   </pages>
</portal>
The name specified for the layout to use has to match one of the names defined in the portal-layouts.xml descriptor of one of the deployed applications.
As you can see, the portal or page property points to the layout to use via the name of the layout. The name has been given to the layout in the layout descriptor. It is in that layout descriptor where the name gets linked to the physical resource (the JSP or Servlet) that will actually render the layout.