Versions Compared

Key

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

Anchor
top
top

In This

...

Topic

Table of Contents
maxLevel2

 

...

 

Creating a Page

The method createAndInsertPage handles the creation of pages. It returns the page that it creates. It takes up to two parameters:

  • page -  the page under which the new page should be created. This parameter is required.
  • position - determines the position the new page will have in the list of subpages of its parent page. If this parameter is omitted, the page will be added to the bottom of the list of subpages of its parent page. The first subpage has position number 0. This parameter is optional.

 

The follwing following code fragment will create two new pages directly underneath the homepage:

...

Code Block
themeEclipse
Page homepage = mySession.getXperienCentralApplication().getWebsites()[0].getHomePage();
// Create a new page underneath the homepage of the first website on this installation
Page newPage1 = myPageService.createAndInsertPage(homepage);
// Create another new page underneath the homepage that will placed above
// newPage1 in the ordering of pages of the Homepage

 

The Current Editing Language

In XperienCentral, multiple languages can be defined in which the website(s) can be made available for visitors. An editor is always working on one specific website language version. This language is called the “current editing language”. These languages are not related to the languages of the XperienCentral user interface.

...

  • When working from the XperienCentral user interface (GUI), the current editing language will always be set to the language in which the editor is working on at that moment.
  • When working from outside the GUI, the current editing language will be set to the default language of the page.

 

Back to Top

 

...

Moving a Page

The pageService contains the method movePage, used to move a page underneath another page. This method returns a boolean that indicates whether the movement process has been successful. It takes up to three parameters:

...

          newPage4

          newPage2

 

Back to Top

 

...

Deleting a Page

The pageService contains a method called deletePage for deleting a page. This method returns a boolean which indicates whether the deletion was successful. This method takes two parameters:

...