GateIn Portal 3.8 default home page URL is [http://]{hostname}:{port}/portal/. There may be multiple independent portals deployed in parallel at any given time, each of which has its root context (for example, [http://]{hostname}:{port}/sample-portal/). Each portal is internally composed of one or more, what we again call 'portals'. It is required to have at least one such portal - the default one called 'classic'. When accessing the GateIn Portal 3.8 default homepage URL, you are automatically redirected to the 'classic' portal.
The default portal performs another important task. When starting up GateIn Portal 3.8 for the first time, its JCR database will be empty (that is where portals keep their runtime-configurable settings). It is the default portal used to detect this, and to trigger automatic data initialization.
Configuration
The following example configuration can be found at: "portal.war:/WEB-INF/conf/portal/portal-configuration.xml".
<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>
...
</init-params>
</component-plugin>
</component-plugins>
</component>
In this example, the classic portal has been set as the default.
Components, component-plugins, and init-params are explained in Foundations chapter. For now just note how NewPortalConfigListener component-plugin is used to add configuration to UserPortalConfigService, which is designed in this way to allow other components to add configuration to it.
Tips
Delete Portals Definition by Configuration
In some cases, some portal definitions are defined but not used any more. If you want to delete them, you can add some configurations to portal.war/WEB-INF/conf/portal/portal-configuration.xml.
To delete a portal definition or a portal template definition, you need to define a component plug-in as the example below:
<external-component-plugins>
<target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component>
<component-plugin>
<name>new.portal.config.user.listener</name>
<set-method>deleteListenerElements</set-method>
<type>org.exoplatform.portal.config.NewPortalConfigListener</type>
<description>this listener delete some predefined portal and templates configuration</description>
<init-params>
<object-param>
<name>site.templates.location</name>
<description>description</description>
<object type="org.exoplatform.portal.config.SiteConfigTemplates">
<field name="portalTemplates">
<collection type="java.util.HashSet">
<value>
<string>basic</string>
</value>
<value>
<string>classic</string>
</value>
</collection>
</field>
</object>
</object-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>
</collection>
</field>
<field name="ownerType"><string>portal</string></field>
</object>
</object-param>
</init-params>
</component-plugin>
</external-component-plugins>
Set Info bar
You can set the info bar shown by default for portlets of a portal by adding a property to the portal-config configuration of the portal.xml file.
<properties>
<entry key="showPortletInfo">1</entry>
</properties>
There are two values for "showPortletInfo": 0 and 1. If the value is 1, the info bar of portlets is shown by default. If the value is 0, it is hidden.