How to configure the portal pages
When a user logins he sees three types of navigation tree:- Portal Navigation
- Group Navigation
- User Navigation
<component>
<key>org.exoplatform.portal.config.UserPortalConfigService</key>
<type>org.exoplatform.portal.config.UserPortalConfigService</type>
<component-plugins>
<component-plugin>
<name>new.portal.config.user.listener</name>
<set-method>initListener</set-method>
<type>org.exoplatform.portal.config.NewPortalConfigListener</type>
<description>this listener init the portal configuration</description>
<init-params>
<value-param>
<name>default.portal</name>
<description>The default portal for checking db is empty or not</description>
<value>classic</value>
</value-param>
<object-param>
<name>portal.configuration</name>
<description>description</description>
<object type="org.exoplatform.portal.config.NewPortalConfig">
<field name="predefinedOwner">
<collection type="java.util.HashSet">
<value><string>classic</string></value>
<value><string>webos</string></value>
</collection>
</field>
<field name="ownerType"><string>portal</string></field>
<field name="templateLocation"><string>war:/conf/portal</string></field>
</object>
</object-param>
<object-param>
<name>group.configuration</name>
<description>description</description>
<object type="org.exoplatform.portal.config.NewPortalConfig">
<field name="predefinedOwner">
<collection type="java.util.HashSet">
<value><string>platform/administrators</string></value>
<value><string>platform/users</string></value>
<value><string>platform/guests</string></value>
<value><string>organization/management/executive-board</string></value>
</collection>
</field>
<field name="ownerType"><string>group</string></field>
<field name="templateLocation"><string>war:/conf/portal</string></field>
</object>
</object-param>
<object-param>
<name>user.configuration</name>
<description>description</description>
<object type="org.exoplatform.portal.config.NewPortalConfig">
<field name="predefinedOwner">
<collection type="java.util.HashSet">
<value><string>root</string></value>
<value><string>john</string></value>
<value><string>marry</string></value>
<value><string>demo</string></value>
</collection>
</field>
<field name="ownerType"><string>user</string></field>
<field name="templateLocation"><string>war:/conf/portal</string></field>
</object>
</object-param>
</init-params>
</component-plugin>
</component-plugins>Portal Navigation
The portal navigation are the pages that can be accessed even when the users are not log in (if the permission allow a public access). Several portal navigations are used for example when a company has several trademarks and each trade would have its own website. The configuration of a portal called "classic" is made by providing 4 XML files under the directory portal/WEB_INF/conf/portal/portal/classic:Portal.xml
That file is describing the layout and portlets that will be shown for every pages. Usually it is the banner, footer, menu, breadcrumbs portlets. Indeed, in eXo, every area is a portlet even the banner and footer which makes the platform extremely configurable.<?xml version="1.0" encoding="ISO-8859-1"?> <portal-config> <portal-name>classic</portal-name> <locale>en</locale> <factory-id>office</factory-id> <access-permissions>Everyone</access-permissions> <edit-permission>*:/platform/administrators</edit-permission> <creator>root</creator> <portal-layout> <application> <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id> <show-info-bar>false</show-info-bar> </application> <application> <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id> <show-info-bar>false</show-info-bar> </application> <application> <instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id> <show-info-bar>false</show-info-bar> </application> <page-body> </page-body> <application> <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id> <show-info-bar>false</show-info-bar> </application> </portal-layout> </portal-config>
Navigation.xml
This file defines all the navigation nodes the portal will have. The syntax is simple as we get nested node tags. Each node references a page that s defined in the next XML file If the label #{} is used then it means the i18n mechanism is activated and that the real label to render is taken from an associated properties file for the current locale.<?xml version="1.0" encoding="UTF-8"?> <node-navigation> <owner-type>portal</owner-type> <owner-id>classic</owner-id> <priority>1</priority> <page-nodes> <node> <uri>home</uri> <name>home</name> <label>#{portal.classic.home}</label> <page-reference>portal::classic::homepage</page-reference> </node> <node> <uri>webexplorer</uri> <name>webexplorer</name> <label>#{portal.classic.webexplorer}</label> <page-reference>portal::classic::webexplorer</page-reference> </node> </page-nodes> </node-navigation>
Pages.xml
This XML file structure is very close from the portal.xml one and it can also contains container tags. Each application can tell if it wishes to render the portlet border as well as the window state icons or the mode ones.<?xml version="1.0" encoding="ISO-8859-1"?> <page-set> <page> <page-id>portal::classic::homepage</page-id> <owner-type>portal</owner-type> <owner-id>classic</owner-id> <name>homepage</name> <title>Home Page</title> <access-permissions>Everyone</access-permissions> <edit-permission>*:/platform/administrators</edit-permission> <application> <instance-id>portal#classic:/web/HomePagePortlet/homepageportlet</instance-id> <title>Home Page portlet</title> <show-info-bar>false</show-info-bar> <show-application-state>false</show-application-state> <show-application-mode>false</show-application-mode> </application> </page> <page> <page-id>portal::classic::webexplorer</page-id> <owner-type>portal</owner-type> <owner-id>classic</owner-id> <name>webexplorer</name> <title>Web Explorer</title> <access-permissions>*:/platform/users</access-permissions> <edit-permission>*:/platform/administrators</edit-permission> <application> <instance-id>group#platform/users:/web/BrowserPortlet/WebExplorer</instance-id> <title>Web Explorer</title> <show-info-bar>false</show-info-bar> </application> </page> </page-set>
Portlet-preferences.xml
Porlet instances can be associated with portlet-preferences that override the one defined in the usual portlet.xml file of the portlet application WAR.<?xml version="1.0" encoding="ISO-8859-1"?> <portlet-preferences-set> <portlet-preferences> <owner-type>portal</owner-type> <owner-id>classic</owner-id> <window-id>portal#classic:/web/BannerPortlet/banner</window-id> <preference> <name>template</name> <value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value> <read-only>false</read-only> </preference> </portlet-preferences> <portlet-preferences> <owner-type>portal</owner-type> <owner-id>classic</owner-id> <window-id>portal#classic:/web/NavigationPortlet/toolbar</window-id> <preference> <name>useAJAX</name> <value>true</value> <read-only>false</read-only> </preference> </portlet-preferences> <portlet-preferences> <owner-type>portal</owner-type> <owner-id>classic</owner-id> <window-id>portal#classic:/web/FooterPortlet/footer</window-id> <preference> <name>template</name> <value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value> <read-only>false</read-only> </preference> </portlet-preferences> <portlet-preferences> <owner-type>portal</owner-type> <owner-id>classic</owner-id> <window-id>portal#classic:/web/GroovyPortlet/groovyportlet</window-id> <preference> <name>template</name> <value>par:/groovy/groovy/webui/component/UIGroovyPortlet.gtmpl</value> <read-only>false</read-only> </preference> </portlet-preferences> </portlet-preferences-set>
Group Navigation
Group navigations are dynamically added (mounted) to the user navigation when he logs in. It means that if a user is part of a group that is associated with some pages than that user will see them in his menu. Here only 3 XML files are necessary: navigation.xml, pages.xml and portlet-preferences.xml. The syntax is the same as for portal navigations. The 3 files are located under the directory: "portal/WEB-INF/conf/portal/group/group-name-path/" like for example "portal/WEB-INF/conf/portal/group/platform/administrators/"User Navigation
The user navigation is the set of nodes and pages that is owned by a user. You can see that part as the user dashboard. The files needed are navigation.xml, pages.xml, portlet-preferences.xml but also the widgets.xml which define the widgets that will be located in the user workspace (left column when the user is login). Those files are located under the directory "portal/WEB-INF/conf/portal/users/{userName}<?xml version="1.0" encoding="ISO-8859-1"?> <widgets> <owner-type>user</owner-type> <owner-id>root</owner-id> <container id="Information"> <name>Information</name> <description>Information's Description</description> <application> <instance-id>user#root:/eXoWidgetWeb/WelcomeWidget/WelcomeWidget1</instance-id> <application-type>eXoWidget</application-type> </application> <application> <instance-id>user#root:/eXoWidgetWeb/StickerWidget/StickerWidget</instance-id> <application-type>eXoWidget</application-type> </application> <application> <instance-id>user#root:/eXoWidgetWeb/InfoWidget/InfoWidget1</instance-id> <application-type>eXoWidget</application-type> </application> </container> <container id="Calendar"> <name>Calendar</name> <description>Calendar's Description</description> <application> <instance-id>user#root:/eXoWidgetWeb/CalendarWidget/CalendarWidget</instance-id> <application-type>eXoWidget</application-type> </application> </container> </widgets>
on 17/01/2008 at 10:59