Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In This Section


 

In XperienCentral it is possible to create orphan pages. Orphan pages are pages without a parent. The pageService offers two methods for working with orphan pages. One method creates a new orphan page, one method moves a page to the orphan pages section. Orphan pages do not appear in the navigation tree of a  website. Pages like "Contact", "Help" and "Search" are typical examples of orphan pages. Unlike all pages underneath the homepage, the pages in the root of the orphan pages subtree in the Site Structure widget can not be ordered.

 

Create a New Orphan Page

To create a new orphan page, use the method createOrphanPage. This method returns the newly created orphan page. It takes one argument:

  • based on page -  the page the orphan is based on (the settings for workflow, page sections, design template, and so forth).

The following code example shows how to create a new orphan page based on the settings for the homepage:

 

Page homepage = mySession.getXperienCentralApplication().getWebsites()[0].getHomePage();
Page newOrphanPage = myPageService.createOrphanPage(homepage);

 

Back to Top

 


Move a Page to the Orphan Pages Subtree

To move a page to the Orphan Pages subtree, use the method moveToOrphanPages. This method returns a boolean which indicates whether the move was successful. The method takes one argument: the name of the page to be moved to the Orphan Pages subtree. For example:

 

Page homepage = mySession.getXperienCentralApplication().getWebsites()[0].getHomePage();
Page newPage1 = myPageService.createAndInsertPage(homepage);
if (!myPageService.moveToOrphanPages(newPage1)) {
	LOG.severe("Failed to move page: " + newPage1 + " to orphan pages.");
} 

 

 

 

 

 

 

 

  • No labels