Download

Switcher

For situations where you want to allow users to just enable or disable some options, you can consider the switcher field which allows only two values - true or false:

{
    "name": "lazyLoad",
    "label": "Lazyload",
    "group": "Additional",
    "note": "Enables lazyloading images that are currently not viewed, thus saving bandwidth.",
    "value": true,
    "type": "checkbox"
}
Switcher HTML

The switcher fields are great to handle conditional display of other options with use of the dependencies parameter described under Theme Settings API.

What are you waiting for?

Start building your site today.

  1. 1 Download Publii
  2. 2 Write your content
  3. 3 Publish your site
Create website