IBM Content Navigator, Version 2.0.3         

Creating a layout

You can create a plug-in to provide a custom layout to use in IBM® Content Navigator. The layout defines the arrangement of the widgets that are used in a desktop.

Procedure

To create a layout:

  1. Extend the ecm.widget.layout.MainLayout.js class to create the primary widget for the layout:
    1. Implement the getAvailableFeatures method to return the features that to be available in the layout. Each feature is declared as an instance of the ecm.model.Feature class.
    2. Implement the setFeatures method to configure how the features are arranged in the layout.
  2. Extend the PluginLayout.java class. Implement the getLayoutClass method to return an instance of the widget class that you created in step 1.
  3. Add the layout as a component in your Plugin.java subclass. To add the feature, implement the getLayouts method to return an instance of the PluginLayout.java class that you created in step 2.

Sample plug-in files for a custom layout

The following files in the sample plug-in define a layout:
Table 1. Sample files that define a plug-in layout
File Description
SampleLayout.js This file extends the MainLayout.js class to create the widget that is used for the sample plug-in layout.
SamplePluginLayout.java This file extends the PluginLayout.java class to define sample plug-in layout.

What to do next

After you add the plug-in in the web client, use the IBM Content Navigator administration tool to associate the layout with a desktop.