What You’ll Learn
- what is the Page Builder theme consist of
- what plugins are used in Page Builder theme
The main configuration file for the Page Builder theme is located at:
This file exports a list of Page Builder theme plugins, and that's what you later import in your website app and then register as a plugin.
The configuration file is structured in several sections like so:
As you can see from the example above, we export two plugins that make the default Page Builder theme. Let's discuss them in detail in the next section.
This is the plugin that registers the actual theme, together with several other elements. It contains the following elements:
Learn more about the specific theme components:
The layout plugin is used to register layouts. Layouts are used to render the page content. The most commonly used layout includes a header at the top, page content in the center and a footer at the very bottom.
In the Page Builder, you can have multiple layouts. For example, one layout where the page is rendered in two-columned, the other in three columned layout.
Here is an example of how to register a layout:
Each layout has the following attributes:
name- an internal identifier for that particular layout
type- plugin type, must be set to
layout- an object containing the layout
title, and a React
componentused to render the layout
To introduce multiple layouts all you need to do is register multiple
It's also quite easy to register a new layout into the default theme:
After saving the change, your newly registered layout should appear in the Categories form, in the Page Builder application as shown below:
In the Page Builder, layouts are linked to page categories. When you create a page category, say "Blog", you need to select a layout. Each page created inside the "Blog" category, by default, use that layout. However, inside the page settings, you can overwrite that on a per-page basis if you need to.
To learn more about layouts and how to compose one, have a look at the layouts article.