Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel2

 

 


...


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 and another 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 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:

...

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


Code Block
themeEclipse
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:

 


Code Block
themeEclipse
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.");
} 

 

 

 

 

 

 

...