<?xml version="1.0"?>
<!--
Copyright 2004 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
  <properties>
    <title>Layouts and Decorations</title>
    <subtitle>Documentation for Designers working with Jetspeed Layouts and Decorations</subtitle>
    <authors>
      <person name="David Sean Taylor" email="taylor@apache.org"/>
    </authors>
  </properties>
  <body>
<section name="Layouts">
<p>
Layout templates are packaged in special Jetspeed-specific and deployable portlet applications. 
Layout templates control the overall aggregation of a portal page. Layout templates are 
combined with portlets, providing a component model for aggregation. Jetspeed-2 comes out 
of the box with several layout components including one, two and three column layouts. 
See the <a href='#Jetspeed-2 Layouts'>Jetspeed-2 Layouts</a> below for all available Layouts in the 
default Jetspeed-2 system. Of course you can define and derive your own layouts. 
</p>
<p>
With regards to aggregation, layouts define how a single portal page is aggregated.
A l ayout defines the fashion in which grouping of fragments
will organized relative to the final, aggregated
content of a request to the portal. Layouts are defined by 
a portlet which applies an algorithm to a template to 
generate the aggregated content of a page. Typical
algorithms are two column, three column, nested.   
</p>
<p>A layout is made up of:
<ul>
  <li>One or more templates</li>
  <li>A template descriptor</li>
  <li>Images</li>
  <li>A Stylesheet (CSS)</li>
  <li>Macros</li>
</ul>
</p>
<p>
    <img src='images/layouts/layouts-overview.png'/>
</p>
</section>
<section name='Packaging'>
<p>
Layouts are packaged as standard portlet applications.
Layouts usual have a 
</p>
<p>
Operations Supported:
<ul>
    <li>Deploy</li>
    <li>Un-deploy</li>
    <li>Re-deploy</li>
</ul>
</p>    
</section>
<section name='Jetspeed-2 Layouts'>
<p>
Jetspeed-2 comes out of the box with several layout components including one, two and three 
column layouts. Of course you can define and derive your own layouts. The table below lists
the available layout components in Jetspeed version 2.0. When customizing (editing) a page,
the layout component is selected. One layout may be assigned per PSML page.
</p>    
<table>
  <tr> 
    <th>Layout</th>
    <th>Type</th>
    <th>Columns</th>
    <th>Sizes</th>
    <th>Modes</th>
    <th>Description</th>
  </tr>    
  <tr>
    <td><b>VelocityOneColumn</b></td>
    <td>OneColumn</td>
    <td>1</td>
    <td>100%</td>
    <td>view,edit,help</td>
    <td>A single column display of one or more fragments taking up 100% of the portlet display area.</td>
  </tr>
  <tr>
    <td><b>VelocityTwoColumns</b></td>
    <td>TwoColumns</td>
    <td>2</td>
    <td>50%,50%</td>
    <td>view,edit,help</td>
    <td>A two column display of one or more fragments where each column is allocated to 50% respectively of the portlet display area.
        Fragments may be placed in either column using <a href='psml.html'>PSML</a> fragment definitions.
     </td>
  </tr>
  <tr>
    <td><b>VelocityTwoColumns</b></td>
    <td>TwoColumns</td>
    <td>2</td>
    <td>50%,50%</td>
    <td>view,edit,help</td>
    <td>A two column display of one or more fragments where each column is allocated to 50% of the portlet display area respectively.
        Fragments may be placed in either column using <a href='psml.html'>PSML</a> fragment definitions.
     </td>
  </tr>
  <tr>
    <td><b>VelocityTwoColumnsSmallLeft</b></td>
    <td>TwoColumns</td>
    <td>2</td>
    <td>15%,85%</td>
    <td>view,edit,help</td>
    <td>A two column display of one or more fragments where the left column is allocated to 15% of the portlet display area,
        and the right column is allocated to 85% of the portlet display area.
        Fragments may be placed in either column using <a href='psml.html'>PSML</a> fragment definitions.
     </td>
  </tr>
  <tr>
    <td><b>VelocityThreeColumns</b></td>
    <td>ThreeColumns</td>
    <td>3</td>
    <td>33%,33%,33%</td>
    <td>view,edit,help</td>
    <td>A three column display of one or more fragments where each column is allocated to 33% of the portlet display area respectively.
        Fragments may be placed in either column using <a href='psml.html'>PSML</a> fragment definitions.
     </td>
  </tr>
  <tr>
    <td><b>VelocityOneColumnNoActions,<br/>VelocityTwoColumnsNoActions,<br/>VelocityThreeColumnsNoActions</b></td>
    <td></td>
    <td></td>
    <td></td>
    <td>view</td>
    <td>Same parameters as their counterparts with actions, but no decorator actions are displayed.
     </td>
  </tr>  
</table>
</section>

</body>
</document>

