Preconfiguring the default content for virtual portals
When you create the virtual portal using the Virtual Portal Manager portlet, the virtual portal is pre-filled with default content. This default content is determined by the default XML script file for initializing virtual portals.
This file can have different names, for example, InitVirtualPortal.xml, or InitVirtualContentPortal.xml, or InitAdminVirtualPortal.xml, depending on the portal installation. It is in a WebSphere Application Server asset named VirtualPortal.zip. To get to this file, access the WebSphere Integrated Solutions Console, select Applications > Application Types > Assets, and locate the file in the list.
To find out which of these XML files is used for creating virtual portals in the installation, select Manage Virtual Portals to open Virtual Portal Manager portlet and select the option Edit Shared Settings from the portlet menu. This shows the WebSphere Application Server asset name and the XML file name inside that asset. To find out which content virtual portals have that you create, review the XML script file under the location that was given earlier.Advanced master administrators can customize the default content for virtual portals as required by modifying or replacing the XML script that specifies the initial content for virtual portals.
Note: When you modify or replace this XML script, plan ahead and apply special care. We can add or remove some content to enhance or reduce the functionality of a virtual portal to a certain extent. The following portal resources are mandatory content of a virtual portal and must be included in a customized XML initialization script for virtual portals:
- Content Root (wps.content.root)
- Login (wps.Login)
- Administration (ibm.portal.Administration).
Depending on the functionality that we want to make available, more content is required. For example, to allow templating. Include Application Root (wps.application.root) and Templates (ibm.portal.Templates).
- Add your custom XML script to a WebSphere Application Server asset. To make this addition, proceed as follows:
- Export the file VirtualPortal.zip from the portal server.
- Log in to the WebSphere Integrated Solutions Console.
- Click Applications > Application Types > Assets.
- Select VirtualPortal.zip.
- Click Export.
- Make a copy of the exported .zip file, and name the copy my_VirtualPortal.zip or similar.
- Add your custom virtual portal script to your copy of the .zip file. For example, the script file can be my_InitVirtualPortal.xml. To add the script, use a utility program for .zip files.
- Log in to the WebSphere Integrated Solutions Console.
- Click Applications > Application Types > Assets.
- Click Import.
- Select your updated copy of the .zip file, for example my_VirtualPortal.zip.
- Click Next > Next > Finish.
- Save changes to the master configuration.
- Open the Manage Virtual Portals portlet by clicking the Administration menu icon. Then, click Virtual Portals > Manage Virtual Portals.
- Open the Manage Virtual Portals portlet menu by clicking the dropdown arrow and select the option Edit Shared Settings.
- Edit the SCRIPT_INIT_VP parameter of the portlet. Replace the current value with the name of your custom XML script and custom asset compressed (.zip) file. We can specify this attribute as a file inside a WebSphere Application Server asset by using a syntax such as this:
WebSphere:assetname=my_VirtualPortal.zip:my_InitVirtualPortalScript.xmlwhere my_VirtualPortal.zip is the name of your asset and my_InitVirtualPortalScript.xml is the name of a file inside the asset. Do not update the default asset VirtualPortal.zip installed with HCL WebSphere Portal. Instead, create and maintain a separate second asset independent of the default asset VirtualPortal.zip.- Optional: To create only an empty virtual portal with no content, we can specify the value for this parameter as follows: WebSphere:assetname=VirtualPortal.zip:InitEmptyVirtualPortal.xml.
- Click OK twice to save changes.
Parent topic: Preconfiguring virtual portals