Our goal is to construct a portal which provides a narrow list of portlets down one side (i.e. a dock) which are available to us as resources. The remainder of the page will be a wider column, which we will drop the portlets onto as we need them. This will allow us to avoid horizontal scrolling in some of our portlets. Below is an example of a portal with a right-hand dock.
We have provided a download with example page.css, portal.css, and portlets property files for both an 80/20 (right-hand dock) and 20/80 (left-hand dock) below.
To setup our 80/20 Portal, we need to modify the following property files:
- a portal.css
- a page.css
- a portlets_en_US.properties
- the portals_en_US.properties
Modifying a portal.css file
Choose any of the portal.css files from your css directory (i.e. /webapps/bugs/css) and copy it. Rename your copy to portal2080.css. Open it in a text editor and change the column widths as shown for a 20 left/80 right layout (see the portal screen shot above). If you prefer the dock on the right, name your file portal8020.css and switch the values in both the portal and page css files from the examples as shown.
Save and close the css file.
Modifying a page.css file
The process of modifying a page.css file is the same as the portal.css file. Make a copy, rename it to your layout, and update the values as shown below (remember to switch the values if you prefer your dock on the right).
Modifying a portlets_en_US.properties file
You will need a property file which defines all of the portlets you wish to have on your 80/20 portal. You may choose to copy one of the portlet property files which shipped with Bugs Dashboard, create a new one or download the zip below and use the supplied 8020 portlet file.
The key to the portlet file is that you only have two columns to work with: zero (0) and one (1). If you choose to use an 80 left/20 right layout, we suggest you put most portlets in column 1 (the dock). We recommend you place only those you know you always want open in the “80” column. If you copy an existing file or create a new one, save it as 8020_portlets_en_US.properties (or 2080_ if you use a left-hand dock).
Modifying the portals_en_US.properties file
Edit the portals_en_US.properties file in the /webapps/bugs/WEB-INF/classes directory. If you are using an Enterprise license, increase the number of total portals by one. If you are using the Developer or View Only editions, modify the values for the first portal rather than making a copy. If you are using an Enterprise edition, copy/paste the group of characteristics where you want the portal to appear. Renumber the portals from that point so that all characteristics are sequentially numbered from zero to the highest grouping.
Set the name of the new portal appropriately. We use 80/20, but if you are restricting it to a particular product, you may wish to use that. Set the pageStyle and style properties to the files you created above. The portlets property should be set to the portlets file you designated above as well. If you wish to restrict the entire portal to one product, set the restrictTo property to the name of the product. Save and close the portals_en_US.properties file.
You may need to restart Tomcat, either through the Windows services control panel, command line, or the use of Tomcat Manager to restart the deployed application. Verify your new portal works as expected and enjoy!
We have included the files used to create the above examples in a downloadable zip file here. The enclosed portlets property files define all portlets which shipped with version 3.0. (Note: this does not include the Scrum Sprint Portlet released after version 3.0 shipped.) You will still need to update your portals_en_US.properties file.