How to make a List within a List

Hi everyone,

I’d like to make a list within a list for the frontmatter formatted either like this:

system_items: [["5","Switches"],["1","Zwave Stick"]]

or

system_items:
  - ["5","Switches","Z-Wave Enabled Light Switch"]
  - ["1","Zwave Stick"]

I’ve tried using the list widget with fields, but to no avail.

Also, is there anyway to manually add or change front matter with the CMS?

The only thing that’s supported at the moment is this syntax:

system_items:
  - - '5'
    - Switches
    - Z-Wave Enabled Light Switch
  - - '1'
    - Zwave Stick

which you can achieve by using this configuration:

- name: system_items
  label: System items
  widget: list
  fields: 
    - name: system_item
      label: System Item
      widget: list
      field: {name: text, label: Text, widget: string}

Changing frontmatter in markdown files is supported by default, just tell the CMS what fields to look after.

1 Like