Moshe
Moshe

Reputation: 6989

Creating a Theme Customization File for October CMS

I am having trouble getting theme customization form fields to show up in the backend when I use a separate theme customization file. This is what I did. In my theme.yaml file -- I have the following code: form: config/fields.yaml. That works to get the customization button to show up in the backend.

However, I'm not 100% sure how to format the config/fields.yaml file. Currently, this is how I have it set up:

form:
  fields:
    layout:
      label: Layout
      comment: Choosed between a boxed or wide layout.
      type: dropdown
      options:
        stretched: Stretched
        boxed: Boxed

But nothing shows up.

I tried taking out the 'form:' -- still nothing shows up.

Am I doing something wrong?

Upvotes: 0

Views: 424

Answers (1)

Sorin Dorobantu
Sorin Dorobantu

Reputation: 81

Delete the "form:" in fields.yaml and reindent all.

form:
  fields:
    layout:
      label: Layout
      comment: Choosed between a boxed or wide layout.
      type: dropdown
      options:
        stretched: Stretched
        boxed: Boxed
fields:
  layout:
    label: Layout
    comment: Choosed between a boxed or wide layout.
    type: dropdown
    options:
      stretched: Stretched
      boxed: Boxed

This should work! Indentation is critical to proper interpretation of YAML

Upvotes: 3

Related Questions