Content - Intro and setup

Pages and sections

The OFW content plugin uses a standard MVC pattern to build full content management functionality (CMS) on top of the basic framework. When creating content pages you will be using the ContentPage and ContentPageSection classes, so it is important to understand how these relate to each other.

A ContentPage is any page reachable with a url. It is essentially equivalent to post or page, so in other words the WP_Post class in WordPress. Once you set up routing (see below) any page you create in the admin will be accessible via

A ContentPageSection is any user-editable content area within the page. Roughly this is the equivalent of WP_Post content, shortcodes, and widgets all combined into one feature. In the admin users can drag and drop one or more areas on to their page, each with its own settings. Multiple columns are also supported, so in addition to standard text content pages (like the posts and pages in WordPress) you can also easily set up home pages, content listing pages, etc.

Let’s take a look at the admin as this will give some insight into how pages and sections relate to each other:
2016-04-23 at 10.29

Installation and set up

To get the very basic installation up and running you need to add the content plugin and set up routing in your default controller’s error method:

function __error($request, $optional_parameters){
	// Show content page if available
	// ...

That’s it – now just create a page in the admin, add some content, and check it out!

Next steps

Usually you’ll need to create a few different page types and perhaps also some section types, so head on over to the next topics on this…

Adding page types Adding section types

Outlast Web & Mobile Development (c) 2023 | Privacy Policy |