Forem Creators and Builders

loading...
Forem Community Success

Overriding a Generated Page

Casey 💎
Community @ Forem - Software Enthusiast! Any questions about Forem, let me know :)
・2 min read

Hola Forem Creators!

If you've successfully set up your own Forem, you may have encountered a "Generated Page" kind of like /about - I'm here to show you how to override that page with a custom one. You can read more about Generated Pages and see a full list of what pages ship with your Forem here in the admin documentation.

image

If you'd prefer a video - click the image below!

Image of the video walkthrough

Getting Started

Important! Please refer to our documentation to see which pages can be overridden, as not all generated pages can be.

Navigate to your admin page and then to the pages section, /admin/customization/pages.

You'll see the "Override defaults" section below the "Pages" section. We'll click the "New page" button in the top right.

Creating the Page

You'll be present a new page with a form to fill out:

A form for creating a new page

To override a page, contact in our case, we'll need to ensure we fill the form out with the proper "title", "slug", and "body markdown".

  • Title: "Contact Us"
  • Slug: "contact"
  • Body Markdown:
### We'd love to hear from you
You can reach us at:
Email: example@yoursite.tld
Twitter: @yourHandle
Enter fullscreen mode Exit fullscreen mode

You'll also notice the "template" dropdown. These options allow different customization.

  • Contained: Forem's default page, like our standard Terms page.
  • Full Within Layout: This gives you full screen real estate.
  • JSON: This option allows you to place JSON data that you can either use as an endpoint or for raw data.

Before creating your page, we'll want to override the current generated page by selecting "Is top level path" and marking that true.

Now you can create the page!

image


It's that easy gif

Discussion (1)

Collapse
michaeltharrington profile image
Michael Tharrington • Edited

Great tutorial and explainer for this Casey!

I imagine lots of folks will want to go and override their /about and /contact pretty soon after launching their Forems.

As such I just added a really basic Contact page design to our open resources repo folder here so that anyone who wants to can copy and use it.