Scoping a layout to a themeAdded by IBM | Edited by IBM on April 12, 2013 | Version 2 (Show original)
|You can scope layouts so that only certain ones show up in your custom theme. The IBM® WebSphere® Portal 8.0 theme included with the portal uses this technique.
Parent topic: Layouts
- Decide which layouts you would like to scope to the theme. The layouts do not all need to come from the same place.
- Open the changeLayout.json file in WebDAV at dav:fs-type1/themes/myCustomTheme/system.
variable is initialized to the value of the WebDAV root folder of the theme that is used on the current page. Change the file contents to point to a layouts.json
file that holds the scoped layouts:
- Open the layouts.json file in WebDAV at dav:fs-type1/themes/myCustomTheme/system. If the file does not exist, create the file.
- Make sure that the file has the following content:
localizationBundleName:'Shelf', identifier:'label', items: [
- For each scoped layout in dav:fs-type1/themes/myCustomTheme/layout-templates, add an entry like the following code sample to the JSON array in the file layouts.json.
For example, here is an entry for a layout that is stored in WebDAV at dav:fs-type1/themes/myCustomTheme/layout-templates
- Refresh your browser cache.
- Reload the page to view the scoped layouts in the Layout tab of the site toolbar.