PageTree demo by

Editing pages

Publishing and URLs

Three settings decide whether a page is served on the website: Active, Published and the publication date. Its address follows from its URL.

The visibility rule

A page is served on the website only if all three conditions are met:

  1. it is Active;
  2. it is Published;
  3. its Publication Date is empty or already past.

In every other case, its URL returns a 404 error to visitors.

ActivePublishedPublication dateOn the website
YesYesEmpty or pastVisible
YesYesFuture404 until the date
YesNo—404
No——404

Since 2.4, signed-in administrators with the Manage block pages permission also see these pages on the website, with a banner that shows their status. To check what a visitor sees, use a private window. See Editing on the website.

Activate or deactivate a page

The Active switch is in the page header. An inactive page is shown with a greyed-out icon in the editor navigator. Deactivating a page removes it from the website without touching its content or its scheduling.

Published or draft

To keep a page as a draft:

  1. Click Scheduling in the document toolbar.
  2. Turn off Published.
  3. Click Apply, then save the page.

Published is on by default for a new page.

Schedule a publication

  1. Click Scheduling.
  2. Leave Published on.
  3. Choose the Publication Date (date and time).
  4. Apply, then save.

The page returns a 404 until that date, then becomes visible with no further action. In the editor navigator, a scheduled page is flagged with a clock icon (hover it to read “Publication scheduled on …”) and an unpublished page with a crossed-out eye icon.

What is served on the website

  • The page is rendered in the layout chosen in its header.
  • Hidden blocks (Displayed? unchecked) are not displayed.
  • Content typed in blocks is displayed as is: Twig code typed in a Text block, for example {{ this.page.title }}, appears as text.
  • Blocks whose type no longer exists are skipped.

The Open page button opens the public URL. For a page that is not visible, you see it with its status banner, but a visitor gets the 404 page.

Tree and URLs

The URL of a page

The URL field of the header is the page slug. A page with the URL /services/audit is served at https://your-site/services/audit. No CMS page file is created.

  • When the page is created, its URL starts with / and follows the title: the title “Our prices” gives /our-prices. You can then change it.
  • The page with the URL / is the home page of the website.
  • Changing the URL of a published page changes its address: the old address then returns a 404 error. Remember the links pointing to it.
  • Give each page a unique URL: PageTree does not prevent saving two pages with the same URL, and only one of them will be served.
  • Also make sure no CMS page of your theme uses the same address as a PageTree page: while the PageTree page is visible, it is the one served.

The tree

There is no parent/child relation to manage: the tree follows the URLs. In the editor navigator:

  • /blog/news is grouped under /blog;
  • if /blog does not exist as a page, a blog folder takes its place;
  • to "move" a page in the tree, change its URL.

PageTree pages appear in the October CMS page finder (menus, link fields) under the Block Pages type. The Link fields of blocks also let you pick them.

Translated pages

When RainLab.Translate is installed, the title, URL, blocks and SEO fields of a page are translatable. Each language can therefore have its own address.