Skip to content

OptizeTeam/bolt-ui-options

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bolt-ui-options

This extension makes it easy to create an option panel for your Bolt site.

alt text

Setup

Define tabs and option fields in the extension its config file.

Or add the example below to your 'theme.yml' file

ui-options:
    -
        name: 'Example options'
        slug: example-options
        fields:
            -
                name: 'Text option'
                slug: text-field
                value: 'Hello textfield!'
                type: text
            -
                name: 'Textarea option'
                slug: text-area
                value: "Hello textarea!"
                type: textarea
            -
                name: 'Select option'
                slug: select-option
                value: "First option"
                type: select
                options:
                    - "First option"
                    - "Second option"
                    - "Third option"
            -
                name: 'Date option'
                slug: date-field
                value: '2016-12-22'
                type: date
    -
        name: 'More options'
        slug: options-more
        fields:
            -
                name: 'Another date option'
                slug: another-date-field
                value: '2016-12-22'
                type: date

Usage

in a twig template use the following function to render the option value

{{ uioption('my-option-slug') }}

About

Provides options with a simple UI

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 78.4%
  • HTML 20.8%
  • CSS 0.8%