40 lines
1.5 KiB
Markdown
40 lines
1.5 KiB
Markdown
# About
|
|
OctoberCMS plugin to add a toggleable switch as a column type to the backend.
|
|
|
|
## Usage
|
|
|
|
To add a switch column to a list; set the `type` of the column to `inetis-list-switch`.
|
|
|
|
Example:
|
|
```yaml
|
|
your_column:
|
|
label: 'Your Label'
|
|
# Define the type as "inetis-list-switch" to enable this functionality
|
|
type: inetis-list-switch
|
|
|
|
# Whether to use ✓/✗ icons to replace the Yes/No text (default: true)
|
|
icon: true
|
|
|
|
# Overrides the title displayed on hover over the column
|
|
titleTrue: 'Unpublish item' # (default: 'inetis.listswitch::lang.inetis.listswitch.title_true')
|
|
titleFalse: 'Publish item' # (default: 'inetis.listswitch::lang.inetis.listswitch.title_false')
|
|
|
|
# Overrides the text displayed on the button
|
|
textTrue: 'Published' # (default: 'inetis.listswitch::lang.inetis.listswitch.text_true')
|
|
textFalse: 'Unpublished' #(default: 'inetis.listswitch::lang.inetis.listswitch.text_false')
|
|
```
|
|
|
|
|
|
## Demo
|
|
*Default behavior*
|
|

|
|
|
|
*Behavior with ` icon: false`*
|
|

|
|
|
|
*With custom titles*
|
|

|
|
|
|
## Author
|
|
inetis is a webdesign agency in Vufflens-la-Ville, Switzerland. We love coding and creating powerful apps and sites [see our website](https://inetis.ch).
|