Managing portal pages using XML

After creating a new portal site and the default portal layout, in this section we can continue to use the XML configuration to define all the pages for a new portal.

Getting ready

Create a new configuration file named pages.xml in the following path of the portal:

02portal.war/WEB-INF/conf/portal/portal/financials/page.xml

How to do it...

For each page you want to define for the portal, you need to enter a page XML element as follows:

  <page>
    <name>contactus</name>
    <title>Contact us</title>
     <access-permissions>Everyone</access-permissions>
     <edit-permission>*:/platform/administrators</edit-permission>
    <portlet-application>

    . . .
    </portlet-application>
    <gadget-application>

    . . .
    </gadget-application>

    <page-body></page-body>
  </page>

How it works...

The configuration engine of GateIn allows for the declaring new pages and also for the defining of all the applications (portlets or gadgets) that must be included inside of them.

The XML element dedicated to define new pages is the page element; it allows declaring the following properties for the page:

  • name: This is the internal name of the page node
  • title: This is the title of the page
  • access-permission: Defines the policy for accessing the page
  • edit-permission: Defines who can edit this page
  • portlet-application: Declares a portlet to embed in the page
  • gadget-application: Declares a gadget to embed in the page
  • page-body: Declares where GateIn will render the current page
  • site-body: Declares where GateIn will render the current page for the site
  • container: Helps to manage an associative element for multiple sub-elements (portlet, gadget, page-body, site-body, or again container)

In order to take a quick look at some of the default components of the portal, you can also use the export tool of GateIn in Chapter 11, Managing Portal Resources with the Management Component. In this way, you can see how to change a specific setting of a portal by trying to import your changes at runtime without restarting your portal instance.

See also

  • Chapter 11, Managing Portal Resources with the Management Component
  • The Managing portals using XML recipe
  • The Managing registered portlets in Chapter 2, Managing Portal Contents Using the GUI
  • The Managing the navigation tree in Chapter 2, Managing Portal Contents Using the GUI
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.162.37