Skip to content

Instantly share code, notes, and snippets.

@wvuwebgist
Last active January 20, 2020 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvuwebgist/e00de2e1e9dadd133635444703f6b564 to your computer and use it in GitHub Desktop.
Save wvuwebgist/e00de2e1e9dadd133635444703f6b564 to your computer and use it in GitHub Desktop.
An example of the available types and options for Custom Data in CleanSlate CMS.
---
layout: default
# These are the custom data attributes that can be applied to the page.
custom_data_attributes:
- fancy_description:
type: text
title: "Fancy Description"
rows: 6
maxlength: 200
wrap: "soft"
required: true
placeholder: "<strong>Hello World</strong>"
default: "This is the song that doesn't end"
readonly: true
- magic_name
- magic_number:
type: number
title: "Magic Number"
min: 10
max: 50
step: 2
default: 12
- sub_title:
type: string
title: "Sub Title"
placeholder: "Rabbits are Fantastic"
required: false
maxlength: 10
readonly: true
- Access Code Test:
type: string
required: true
- article_count:
type: number
title: "Max Article Count"
description: "The number of articles to display on a page."
min: 1
max: 10
placeholder: ""
- items_per_page:
type: select
title: "Items Per Page"
description: "Number of items to display per page."
options: [5, 10, 25, 50, 100]
include_blank: false
default: 10
- fav_animal:
type: select
title: "Favorite Animal"
description: "Pick your favorite animal."
options:
- [Dog, 1]
- [Cat, 2]
- [Gold Fish, 3]
- [Mountain Lion, 4]
- [Rattle Snake, 5]
include_blank: true
default: 3
- best_animals:
type: checkbox
title: "Best Animals"
description: "Select all of your favorite animals."
options:
- "Dog"
- "Cat"
- "Gold Fish"
- "Mountain Lion"
- "Rattle Snake"
- "Cricket"
default:
- "Dog"
- "Rattle Snake"
- cool_numbers:
type: checkbox
title: "Cool Numbers"
options: [10, 13, 18, 42, 69 ]
default: [42, 13]
- feature_1:
type: checkbox
title: "Fancy Feature #1"
description: "Select to enable fancy feature #1"
- feature_2:
type: radio
title: "Fancy Feature #2"
description: "Turn fancy feature #2 on or off."
options:
- "On"
- "Off"
default: "Off"
- frequency:
type: radio
title: "Random Frequency"
options:
- 5
- 25
- 70
default: 70
- slot_count:
type: radio
title: "Number of Slots"
description: "The number of content slots to show on the page."
options:
- 2
- 3
- 4
- 5
default: 3
- cool_url:
type: url
title: "Cool URL"
description: "This URL should blow your mind."
maxlength: 1000
minlength: 5
pattern: "https://.*.wvu.edu/.*"
placeholder: "https://example.com"
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment