Adding a New Page Layout for Widgets

If you want to add a new page layout to Rave on which to render widgets, here are the steps that currently need to be performed. This is an area that could be improved in the Rave architecture.

1) Add a new JSP fragment to:

rave-portal-resources > src > main > webapp > WEB-INF > jsp > layouts
  • This fragment should outline the region structure of your layout in HTML

2) Insert a new record into the PAGE_LAYOUT table which corresponds to your new layout.

  • entity_id: the primary key value of the record
  • code: should match the file name of your JSP layout fragment, minus the ".jsp"
  • number_of_regions: the number of regions your JSP layout fragment has that can contain widgets
  • render_sequence: the order in which this layout option will appear to the user in the add page or edit page dialogs
  • user_selectable:
    • true: if you want the user to be able to select this layout in the add/edit page dialogs
    • false: if you do not want the user to be able to select this layout for a user page

3) Add a new property to the messages.properties bundle for your layout:

page.general.addpage.layout.<layout code>=<Human Readable Value>

example: page.general.addpage.layout.columns_10=Ten Columns

4) Rebuild and deploy Rave

  • Your new layout should appear in the "Select Page Layout" list when adding or editing a page