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:

...