Layouts 
|
You can scope layouts so that only certain ones show up in your custom theme. The IBM® WebSphere Portal 7.0.0.2 theme included with the portal uses this technique. |
You can scope layouts so that only certain ones show up in your custom theme. The IBM® WebSphere Portal 7.0.0.2 theme included with the portal uses this technique.
- 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 file changeLayout.json in WebDAV at dav/fs-type1/themes/myCustomTheme/system. Change the file contents to point to a layouts.json file that holds the scoped layouts:
{
localizationPackageName:"com.ibm.bundles",
localizationBundleName:"Shelf",
categories: [
{
"label":"add_content_all",
"searchStr":"shelf_searchAll",
"datastore":"com.ibm.data.JsonStore",
"url":ibmCfg.themeConfig.themeRootURI+"/system/layouts.json"
}
]
}
- Open the file layouts.json 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:
{
localizationPackageName:'com.ibm.bundles',
localizationBundleName:'Shelf', identifier:'label', items: [
]
}
- For each scoped layout in dav/fs-type1/themes/myCustomTheme/layout-templates, add an entry like the following to the json array in the file layouts.json . For example, here is an entry for a layout stored in WebDAV at dav/fs-type1/themes/myCustomTheme/layout-templates:
{'label':'My Layout','url':'dav:fs-type1/themes/myCustomTheme/layout-templates/myLayout/','id':'myLayout','thumbnail':ibmCfg.themeConfig.themeRootURI+'/layout-templates/myLayout/icon.gif'}
- Refresh your browser cache.
- Reload the page to view the scoped layouts in the Change Layout tab of the toolbar.
Parent topic: Theme customization
|
|
|
|
| Version 2 |
February 22, 2012 |
12:14:36 PM |
by IBM  |
|
|