Theme layout templates (layout.html)
Layout templates control the layout and positioning of the content on a page. The static layout template is called layout.html . The author of the layout template defines the HTML fragment markup and CSS for the layout of the page. The HTML fragment uses microformat to specify containers and components, such as portlets and iWidgets to include in the page.
Example
<div class="hiddenWidgetsDiv"> <div class="component-container hiddenWidgetsContainer ibmDndRow" name="ibmHiddenWidgets"></div> <div style="clear:both"></div> </div> <div class="component-container ibm2Col ibmDndColumn" name="ibmMainContainer"></div> <div class="component-container ibm2Col ibmRightCol ibmDndColumn" name="right"></div>The example above defines a two-column layout, with a hidden container for widgets which participate in the wiring of the page, but are not visible themselves. The meaning of the elements is as follows:
class="component-container"The static page parser recognizes this microformat to define containers in the page layout model that can contain components. Components can be portlets or widgets.
name="ibmMainContainer"The name attribute on a component container identifies that container uniquely to the page. The static page parser uses the name to correlate containers when it updates the page definition. Using consistent names across layout templates preserves container contents across template switches.
class="ibmDndColumn"
class="ibmDndRow"These classes are required for client-side drag and drop support.
class="ibm2Col"
class="ibmRightCol"These classes provide CSS positioning information. These classes will differ, depending on the requirements of the particular layout.
Add portlets and iWidgets to layout templates
You can add portlets and iWidgets directly to the layout template definition by using the portlet microformat for static pages, or the iWidget definition specification. You can add portlets or iWidgets inside or outside of containers. The template is applied to the page as a copy. Therefore every page that uses the template has a new instance of the portlet or iWidget.
Parent
Elements of a theme
Related tasks
Register iWidgets for use with the Page Builder theme