Create internal redirect page with the native API

  1. Get an instance of the PageManager.
    Like standard pages, internal redirect pages are also manipulated by the PageManager. To work with a group page, you need to get an instance of the manager.
  2. Set the parent of the page.
    You can add the page under any other page by passing the parentPageNodeId as an argument. If you pass an empty GUID the new page is created on root level.
  3. Create the page.
    You create new page using the CreatePage method of the PageManager. The method has two overloads. Set the last parameter of the method to NodeType.InnerRedirect

    The method returns an object of typePageNode. Later, by setting the corresponding properties of the page node, you can set its name, description, title, creation date, visibility in the navigation, etc.

    NOTE: You must set the LinkedNodeId property. You set it to the page node ID of the inner page that you want to redirect to.

  4. Save the changes.
    Save all changes that you have made to the page using the SaveChanges method of thePageManager.

EXAMPLE: In the following code example, the CreateInternalRedirectPage method create a new group page:

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?