This page is no longer valid. For information about the Layout Reorderer, see Layout Reorderer API.

This documentation refers to the trunk version of the Layout Customizer code. For documentation specific to the v0.4 release, please see Layout Customizer API - v0.4.


The Layout Customizer can be used to provide the ability to change the layout of content modules, for example portlets within a portal environment.

It can be used to organize arbitrary pieces of content, or "modules," provided they are laid out in columns. For details about how modules must be laid out for use with the Layout Customizer, see Tutorial – Layout Reorderer Selectors.

The Layout Customizer is initialised with two data structures describing the initial layout of the modules and any restrictions on their movement. It can be customized by providing any of a number of optional parameters.

Initializing the Layout Customizer

fluid.initLayoutCustomizer(layout, perms, orderChangedCallbackUrl[, options]);


Join the fluid-talk mailing list and ask your questions there.


The layout object specifies the IDs of the DOM elements and the relationships between them.

For more information about the layout object, see the Layout Customizer - Layout and Permissions.


The perms object is a two-dimensional array of binary numbers (i.e. 0s and 1s) describing any restrictions on where modules can be moved. If there are no restrictions, pass null for this parameter.

In the array,

For details about drop targets and the perms object, see the Layout Customizer - Layout and Permissions.


The orderChangedCallbackUrl is the URL that the Layout Customizer should use to communicate changes in the layout to the server. The Layout Customizer will POST the updated layout to the URL, and expects an updated perms object in response. If there are no restrictions on permissions, the perms object should contain all 1s (for details about the structure of the perms object, see the Layout Customizer - Layout and Permissions).


The options parameter is an optional collection of name-value pairs that configure the Layout Customizer:


General options

Layout Customizer-specific options


The Layout Customizer dependencies can be met by including the minified Fluid-all.js file in the header of the HTML file:

<script type="text/javascript" src="Fluid-all.js"></script>

Alternatively, the individual file requirements are:

<script type="text/javascript" src="jquery/jquery-1.2.6.js"></script>
<script type="text/javascript" src="jquery/jARIA.js"></script>
<script type="text/javascript" src="jquery/jquery.keyboard-a11y.js"></script>
<script type="text/javascript" src="jquery/ui.core.js"></script>
<script type="text/javascript" src="jquery/ui.draggable.js"></script>
<script type="text/javascript" src="json/json2.js"></script>
<script type="text/javascript" src="fluid/Fluid.js"></script>
<script type="text/javascript" src="fluid/FluidDOMUtilities.js"></script>
<script type="text/javascript" src="fluid/GeometricManager.js"></script>
<script type="text/javascript" src="fluid/Reorderer.js"></script>
<script type="text/javascript" src="fluid/LayourCustomizer.js"></script>
<script type="text/javascript" src="fluid/ModuleLayout.js"></script>