locomotivecms / steam

The rendering stack used by both Wagon and Station (new name of the engine). It includes the rack stack and the liquid drops/filters/tags.
MIT License
38 stars 59 forks source link

[WIP] Add Support for pre-defined Custom Field Types #151

Open westonganger opened 5 years ago

westonganger commented 5 years ago

Solves feature request within https://github.com/locomotivecms/engine/issues/1277#issuecomment-482546151

Custom field types are defined as .json files within config/custom_field_types/

Example Usage:

// config/custom_field_types/color_selector.json

{
  "type": "select",
  "options": [
    {"label": "Pink - #e69798","value": "bg-pink"},
    {"label": "Yellow - #f3c577", "value": "bg-yellow"}
  ]
}
// within the section definition

"settings": [
  {
    "type": "color_selector",
    "id": "background_color",
    "label": "Background Color"
  }
]

TBD:

I will be needing some assistance to complete this feature as so far I am only familiar with the Filesystem adapters.

Please feel free to refractor as necessary.

Related PR's:

westonganger commented 5 years ago

Please place this functionality on high priority. This is much needed.

did commented 5 years ago

@westonganger let's talk about it on Gitter!