Section data
Section data concepts for Built.js themes and plugins.
A Section represents a section of a web page. In Built Studio, you can define the fields a section will have and then the data that will be passed to the section.
Once you've exported the theme or plugin and set up your Next.js theme/plugin project, you will find the field configuration in public/data/schemas/sections.json
:
And the section data will be in the public/data/sections.json
:
As you can see in the code, a section has one or more templates. Creating more templates for a section will allow the end user more options to choose from for a section when creating a site from the theme.
Instead of directly defining sections in a page, they are defined in a ModulePage instead so that the sections for pages can be associated with modules:
As you can see, this is also where you specify where you think the section should appear in the page. A section with a low "position" like 0
will appear at the top of the page in Built Studio, and sections with higher position values will appear further down the page (however the end user can still move a section to a different position in Built Studio, or to a different page).