Building sites

Pages

A page is a title, a path, a few navigation settings and a list of saved revisions. What visitors see is whichever revision is published; everything else is kept as history. Pages live under Content in the admin.

Creating a page

Content → New page asks for a title and offers a starting point: Blank, Hero page or Contact. The path is made from the title (lower case, anything that is not a letter or digit becomes a dash), so "Fitted wardrobes" becomes /fitted-wardrobes. Tick "This is the home page" to give the page the empty path, /; a site has one home page, and until it has one the core serves its own welcome page at /. Paths are unique, so a second page at the same path is refused. Creating a page opens it in the builder.

Every page starts with an empty revision named "Created"; starting from a template adds a second one, such as "Started from Hero page".

Paths and nested paths

Change the path under Content → the page → Settings. A path may contain slashes, so services/kitchens is served at /services/kitchens; leading and trailing slashes are removed. The path is independent of the page's parent: choosing a parent changes the navigation, not the address.

When the path of a published page changes, Gansey leaves a redirect from the old address to the new one, so links people saved keep working.

A page wins over everything else at its path. If a page and a content type both claim /projects, the page is served; a module route at the same address only answers when the site has no published page or content type there.

Drafts, publishing and revisions

Saving in the builder adds a revision; it never changes the live page. The builder also autosaves a draft 30 seconds after your last change while there are unsaved changes. An autosave replaces the previous autosave rather than adding another revision, until you save by hand or publish. Autosave can be switched off per browser in the builder header.

Publish makes a revision live. If there are unsaved changes it saves them first (as a revision named "Published"). Publishing needs the publish pages permission; saving needs edit pages.

The History panel in the builder lists every revision, newest first, with the published one marked. Load puts a revision on the canvas (you can undo it, and nothing changes on the site until you save or publish); Publish makes it live directly, which is how you roll a page back.

A page's status is Draft until its first publish, then Published. Archive, in the page's settings, takes it off the site and keeps every revision; Delete removes the page and its revisions for good. Archiving needs the delete pages permission.

Scheduled publishing

Under Content → the page → Settings → Scheduled publishing, pick a date and time and the core publishes the page then, whether or not anyone is signed in. It checks every 30 seconds. The revision it publishes is the one that was latest when you set the schedule; if you save changes afterwards that should go out too, set the schedule again. Publishing by hand clears the schedule. A scheduled page shows as Scheduled in the list, or "Published · update scheduled" when it is already live.

Preview link, in the same settings drawer, copies an address that shows the page's latest revision with the site's header and footer, to anyone, without signing in. It lasts three days. Preview pages are never cached and ask search engines not to index them.

Description and navigation

  • Description becomes the page's <meta name="description"> and the text under the page in the site's own search results. Search looks at it too, so a page can be found by words that are not in its title.
  • Parent puts the page under another in the navigation. The navigation shows one level of children: a dropdown in a horizontal menu, indented in a vertical one. Parents also matter for header and footer display rules ("Page is, or is under"; see Site parts).
  • Navigation order sorts pages among their siblings, lowest first; ties sort by path. The home page always comes first.
  • Show in navigation leaves the page out of menus when switched off. The page is still published and reachable.

The navigation lists published top-level pages that are shown in navigation, each with its visible children, followed by content type listings that ask to be in the navigation. The nav widget and the built-in header both use it.

With nothing selected in the builder, the page card's "Header and footer" group chooses a header and a footer for this page alone. "Site default" follows the site's rules; any other choice is one of the site's header or footer parts. Drafts are marked, and a chosen part that is not published falls back to the site default until it is. The choice is saved straight away. See Site parts.

Languages

The site's locale (Settings → Site → Locale) sets the <html lang> attribute of every page; en-GB gives lang="en". Serving the same site under language prefixes, such as /fr/about, is the job of a multi-language module: core then answers /fr/about with the /about page marked lang="fr", and the module decides what the page says. See Modules.