Lotus wiki article (
Click Here) didn’t provide the complete details on how the custom layout works in page builder theme. Following article tries to explain the internal details on how the custom layouts works in page builder theme .
Create custom layout (1Row3ColumnEqualFooter) using HTML DIV tags that looks like below
Step 2: copy the out of the box “customLayout” folder from the “layout-templates” to you local drive
Step 3: Rename the folder copied in above step to “1Row3ColumnEqualFooter”and also update the following files in it i.e. update the icon.gif with new icon.gif (looks like above) and also update the localized_en.properties file with title as (1Row3ColumnEqualFooter).
Step 5: Now you can see this custom layout on portal(may need to re login if doesn’t work) , Actionsà EditPageà Customizeà ChangeLayout . Now you should able to see the layout
Above steps explained in the wiki article also , but this isn’t yet solved the entire problem.
How to change the layout.html that re-presents the layout in above icon.
Step 1: Need to edit the layout.html and layout.css under the “1Row3ColumnEqual Footer” folder in webDAV
Step 2: Copy the following lines into the layout.hml (replace existing content)
<div class="hiddenWidgetsDiv">
<!-- widgets in this container are hidden in the UI by default -->
<div class="component-container hiddenWidgetsContainer ibmDndRow" name="ibmHiddenWidgets"></div>
<div style="clear:both"></div>
</div>
<div class="component-container ibmRow ibmDndRow" name="ibmMainContainer"></div>
<div class="component-container ibm3Col ibmDndColumn" name="left"></div>
<div class="component-container ibm3Col ibmDndColumn" name="middle"></div>
<div class="component-container ibm3Col ibmRightCol ibmDndColumn" name="right"></div>
<div class="component-container ibmRow ibmDndRow" name="footer"></div>
Step 3: Copy the following lines to layout.css
.ibmClearRow { clear:both; }
.hiddenWidgetsContainer{ display:none; margin-bottom:10px; }
.ibm3Col { float:left; width:32.5%; margin:0 .8% 2px 0; overflow:hidden; position:relative; }
.ibm_rtl .ibm3Col { margin:0 0 5px .8%; }
.ibmRow { width:100%; overflow:hidden; margin-bottom:10px; }
.ibmRightCol { margin-right:0px; margin-right:0%; }
Step 4: Update these files on the webDAV “1Row3ColumnEqualFooter” folder
Step 5: To see the changes , create a portal page and apply the page builder theme.
Step 6: To apply the custom layout for that page, access portal pageà actionsà edit page à customize à change layout à choose “1Row3ColumnEqual” and click save.
Step 7: Go back to administration and click “edit” icon for the page now it look like below and add portlets to containers and click “done”.
Step 8: Access the page to see the layout
Relation or Mapping between the <DIV> tags in layout.html and layout containers
It looks so simple to add the new layout but the page builder theme does following things to indetify what portlets need display under what <DIV> tag.
Once we select the layout in the page customization and click on it to save , then it actually update or adds lot of metadata to page. XML for the above page as follows
<?xml version="1.0" encoding="UTF-8"?>
<content-node action="update" active="true"
allportletsallowed="true" content-parentref="Z6_000000000000000000000000A0"
create-type="explicit" domain="rel" objectid="Z6_S11VAVH4089E00IPA0S69O20I1"
ordinal="5800" themeref="ZJ_CGAH47L000CS30IAH1044E1KJ5" type="staticpage"
uniquename="TestCustomLayout">
<localedata locale="en">
<title>TestCustomLayout</title>
</localedata>
<parameter name="com.ibm.portal.IgnoreAccessControlInCaches" type="string" update="set"><![CDATA[false]]></parameter>
<parameter name="com.ibm.portal.bookmarkable" type="string" update="set"><![CDATA[true]]></parameter>
<parameter name="com.ibm.portal.layout.template.ref" type="string" update="set"><![CDATA[dav:fs-type1/layout-templates/1Row3ColumnEqualFooter]]></parameter>
<parameter name="com.ibm.portal.remote-cache-expiry" type="string" update="set"><![CDATA[86400]]></parameter>
<access-control externalized="false" owner="uid=wpsadmin,o=defaultWIMFileBasedRealm" private="false" />
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20I5" ordinal="100" orientation="V" skinref="undefined" type="container" width="undefined">
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20I3" ordinal="100" orientation="V" skinref="undefined" type="container" width="undefined" />
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20I7" ordinal="500" orientation="H" skinref="undefined" type="container" width="undefined">
<parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[ibmHiddenWidgets]]></parameter>
<parameter name="css-classes" type="string" update="set"><![CDATA[ibmDndRow hiddenWidgetsContainer]]></parameter>
</component>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A0" ordinal="600" orientation="H" skinref="undefined" type="container" width="undefined">
<parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[ibmMainContainer]]></parameter>
<parameter name="css-classes" type="string" update="set"><![CDATA[ibmDndRow ibmRow]]></parameter>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A3" ordinal="100" skinref="undefined" type="control" width="undefined">
<portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O20A7" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O20A7" />
</component>
</component>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A6" ordinal="700" orientation="H" skinref="undefined" type="container" width="undefined">
<parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[left]]></parameter>
<parameter name="css-classes" type="string" update="set"><![CDATA[ibm3Col ibmDndColumn]]></parameter>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20Q0" ordinal="100" skinref="undefined" type="control" width="undefined">
<portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O20Q4" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O20Q4" />
</component>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O2060" ordinal="200" skinref="undefined" type="control" width="undefined">
<portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O2064" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O2064" />
</component>
</component>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A1" ordinal="800" orientation="H" skinref="undefined" type="container" width="undefined">
<parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[middle]]></parameter>
<parameter name="css-classes" type="string" update="set"><![CDATA[ibm3Col ibmDndColumn]]></parameter>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20Q2" ordinal="100" skinref="undefined" type="control" width="undefined">
<portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O20Q6" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O20Q6" />
</component>
</component>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A4" ordinal="900" orientation="H" skinref="undefined" type="container" width="undefined">
<parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[right]]></parameter>
<parameter name="css-classes" type="string" update="set"><![CDATA[ibm3Col ibmRightCol ibmDndColumn]]></parameter>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20Q1" ordinal="100" skinref="undefined" type="control" width="undefined">
<portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O20Q5" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O20Q5" />
</component>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O2062" ordinal="200" skinref="undefined" type="control" width="undefined">
<portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O2066" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O2066" />
</component>
</component>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A5" ordinal="1000" orientation="H" skinref="undefined" type="container" width="undefined">
<parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[footer]]></parameter>
<parameter name="css-classes" type="string" update="set"><![CDATA[ibmDndRow ibmRow]]></parameter>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20Q3" ordinal="100" skinref="undefined" type="control" width="undefined">
<portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O20Q7" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O20Q7" />
</component>
</component>
</component>
</content-node>
- Names of DIV tags in layout.html are added in container component node level parameters.
- CSS classes of DIV tags in layout.html, are also added at container component node level parameters to arrange the containers positions or alignment
FAQ’s
- What is the main purpose of the page builder theme custom page layouts ?
Ans: Page builder theme helps to separate the page layout design with page administration by separting the “layout” from the portal page by keeing it webDAV.
- Why there is nothing called custom layouts in the standard portal theme ?
Ans: As standard portlet theme uses the out the box layout tools , Page “Editors/Admins” can modify the layout directly in page “edit layout”. It has flexibility to arrange the containers in any layout.
- Difference between PageBuilder Theme custom page layout vs Portal Theme out of box page layout?
Ans: In starndard portal theme page layout gets generated by using the HTML table cell structure . Layout containers uses the table structure to arrange the portlets on the page. But page bulder theme uses the Div layouts to generate the page structure.
- Can we create the DIV layout structure using the standard portal theme?
Ans: Yes, but need to use the custom CSS styles to move the portlets to arrange the layout.