Create a section

You can create sections in the developer directory or inside a layout. Start by creating a folder with the following structure:

The folder structure of section. 1. Assets folder: Includes section resources like css, js and image 2. section.lh: Includes schema and code of this section 3. settings.js: Declare fields in section 4. style.css: Stylesheet file of this section 5. Thumbnail file

section.lh
settings.js
Download .ZIP
section.lh
@schema
{
"name" : "First Section",
"author" : "LayoutHub Team",
"website" : "https://www.LayoutHub.com",
"version" : "1.0",
"vendors" : [],
"configs" : {}
}
@endschema
<div>Your first setting is {{section.settings.first}}</div>
settings.js
[
{
name: 'first',
label: 'The first setting',
type: 'text',
value: 'The default value'
}
]
Download .ZIP

Download the sample file below and unzip in the developer direction. If you still have not activated developer mode, click here.

If you love LayoutHub, could you consider posting an review? That would be awesome and really help us to grow our business, here is the link.