You are looking at documentation for an older release. Not what you want? See the current release documentation.
The structure of a site is mainly defined into 3 files: portal.xml
, pages.xml
and navigation.xml
.
You can create multiple pages within a single site.
Understanding the "Intranet" site of eXo Platform is a good approach to the site structure.
The configuration of the "Intranet" site can be found in the $PLATFORM_TOMCAT_HOME/webapps/acme-intranet.war
directory.
portal.xml
The portal.xml
file describes the layout and portlets that will be shown on all pages:
Properties which define site name, default locale, access and edit permissions, and some basic configurations (session alive, show portlet information) of the "Intranet" site.
<portal-name>intranet</portal-name>
<locale>en</locale>
<access-permissions>*:/platform/users</access-permissions>
<edit-permission>*:/platform/administrators</edit-permission>
<properties>
<entry key="sessionAlive">onDemand</entry>
<entry key="showPortletInfo">0</entry>
</properties>
Layout which defines layout container, banner, footer, menu and breadcrumbs portlets displayed in all pages. Also, <page-body>
is a flag which specifies the position of pages' portlets.
<portal-layout>
<move-apps-permissions>*:/platform/administrators</move-apps-permissions>
<move-containers-permissions>*:/platform/administrators</move-containers-permissions>
<container id="NavigationBody" template="system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl">
<access-permissions>Everyone</access-permissions>
<container id="LeftNavigation" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
<access-permissions>*:/platform/users</access-permissions>
<container id="LeftBreadCrumbNavigationPortlet" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
<access-permissions>*:/platform/users</access-permissions>
<portlet-application>
<portlet>
<application-ref>platformNavigation</application-ref>
<portlet-ref>UIBreadCrumbsNavigationPortlet</portlet-ref>
</portlet>
<access-permissions>*:/platform/users</access-permissions>
<show-info-bar>false</show-info-bar>
</portlet-application>
</container>
<container id="LeftNavigationPortlet" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
<access-permissions>*:/platform/users</access-permissions>
<portlet-application>
<portlet>
<application-ref>platformNavigation</application-ref>
<portlet-ref>UICompanyNavigationPortlet</portlet-ref>
</portlet>
<access-permissions>*:/platform/users</access-permissions>
<show-info-bar>false</show-info-bar>
</portlet-application>
</container>
<container id="GroupsNavigationPortlet" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
<access-permissions>*:/platform/users</access-permissions>
<portlet-application>
<portlet>
<application-ref>platformNavigation</application-ref>
<portlet-ref>UIGroupsNavigationPortlet</portlet-ref>
</portlet>
<access-permissions>*:/platform/users</access-permissions>
<show-info-bar>false</show-info-bar>
</portlet-application>
</container>
<container id="SpaceNavigationPortlet" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
<access-permissions>*:/platform/users</access-permissions>
<portlet-application>
<portlet>
<application-ref>platformNavigation</application-ref>
<portlet-ref>UISpaceNavigationPortlet</portlet-ref>
</portlet>
<access-permissions>*:/platform/users</access-permissions>
<show-info-bar>false</show-info-bar>
</portlet-application>
</container>
</container>
<container id="RightBody" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
<access-permissions>Everyone</access-permissions>
<page-body> </page-body>
</container>
</container>
</portal-layout>
The move-apps-permissions
and move-containers-permissions
tags define which users have permissions to move applications and containers on this layout. If these permissions are not set explicitly, they would default to Everyone.
navigation.xml
The navigation.xml
file defines all navigation nodes of a site.
The syntax is simply using the nested node tags. Each node refers to a page defined in the pages.xml
file that will be explained later.
Node that defines URI, name, label and page reference of the "Intranet" homepage.
<node>
<uri>home</uri>
<name>home</name>
<label>#{portal.intranet.home}</label>
<page-reference>portal::intranet::homepage</page-reference>
</node>
A node navigation might contain sub-nodes.
<node>
<uri>connections</uri>
<name>connections</name>
<label>#{portal.intranet.connections}</label>
<visibility>SYSTEM</visibility>
<node>
<uri>connections/all-people</uri>
<name>all-people</name>
<label>#{portal.intranet.yours}</label>
<page-reference>portal::intranet::all-people</page-reference>
</node>
<node>
<uri>connections/network</uri>
<name>network</name>
<label>#{portal.intranet.yours}</label>
<page-reference>portal::intranet::network</page-reference>
</node>
...
</node>
For the top nodes, the URI and the navigation node name must have the same value.
For sub-nodes, the URI is composed like <uri>connexions/all-people</uri> where 'connections' is the name of the parent node, and 'all-people' is the name of node (<name>all-people</name>).
When you configure the navigation.xml
file, sometimes you need to set the node visibility.
To configure the node visibility, simply put <visibility>type_of_visibility</visibility> as a child of the <node> tag.
eXo Platform supports 4 types of node visibility, including:
DISPLAYED: The node will be displayed.
HIDDEN: The node is not visible in the navigation but can be accessed directly with its URL.
SYSTEM: It is a system node which is visible to superusers. In particular, only superusers can change or delete this system node.
TEMPORAL: The node is displayed in related time range. When the visibility of TEMPORAL node is configured, the start and end dates can be specified by using <startpublicationdate> and <endpublicationdate>.
pages.xml
The pages.xml
defines the layout and portlets of specific pages.
A page defined in pages.xml
will declare name, title, access and edit permissions, move applications and containers (optional).
Also, the <portlet-application>
is used to declare portlets in a page.
<page>
<name>activities</name>
<title>Activities</title>
<access-permissions>*:/platform/users</access-permissions>
<edit-permission>manager:/platform/administrators</edit-permission>
<move-apps-permissions>manager:/platform/administrators</move-apps-permissions>
<move-containers-permissions>manager:/platform/administrators</move-containers-permissions>
<container id="UIUserNavigationPortlet" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
<access-permissions>*:/platform/users</access-permissions>
<move-apps-permissions>manager:/platform/administrators</move-apps-permissions>
<move-containers-permissions>manager:/platform/administrators</move-containers-permissions>
<portlet-application>
<portlet>
<application-ref>platformNavigation</application-ref>
<portlet-ref>UIUserNavigationPortlet</portlet-ref>
</portlet>
<title>User Navigation Portlet</title>
<access-permissions>*:/platform/users</access-permissions>
<show-info-bar>false</show-info-bar>
<show-application-state>true</show-application-state>
</portlet-application>
</container>
<container id="ProfileActivity" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
<access-permissions>*:/platform/users</access-permissions>
<move-apps-permissions>manager:/platform/administrators</move-apps-permissions>
<move-containers-permissions>manager:/platform/administrators</move-containers-permissions>
<portlet-application>
<portlet>
<application-ref>social-portlet</application-ref>
<portlet-ref>UserActivityStreamPortlet</portlet-ref>
</portlet>
<title>User Activity Stream</title>
<access-permissions>*:/platform/users</access-permissions>
<show-info-bar>false</show-info-bar>
<show-application-state>true</show-application-state>
</portlet-application>
</container>
</page>