☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

values_from_glob

Table of contents

Description:

This key defines globs that filter which files CloudCannon should use for Structure value configuration.

Values in this array are relative to the root of your repository (i.e., /, not the value of source) and must end in the file extension .cloudcannon.structure-value.yml (note the singular form of "value").

You can use this key anywhere you would use the _structures.*.values key.

Please see our documentation on structures_from_glob for defining a Structure in a split Configuration File.

This key has no default.

Appears in:
└── Structure
    └── values_from_glob
Type:
Array<values_from_glob[*]>
Items:
[*]string#

This key represents an individual glob pattern string in the values_from_glob array.

The value is a string that specifies a file path pattern relative to the root of your repository. The path must end in the file extension .cloudcannon.structure-value.yml (note the singular form of "value").

Show examplesHide examples

In this example, the staff Array Input uses inline Structure values from the main Configuration File and also references another value from the boardMember.cloudcannon.structure-value.yml in the /.cloudcannon/structures/ folder.

Copied to clipboard
_inputs:
  staff:
    type: array
    options:
      structures: 
      values_from_glob: /.cloudcannon/structures/boardMember.cloudcannon.structure-value.yml
      values:
        - label: Employee
          value:
            name: 
            title: 
            profile_picture: 
        - label: Manager
          value:
            name: 
            title: 
            profile_picture: 
            url:
{
  "_inputs": {
    "staff": {
      "type": "array",
      "options": {
        "structures": null,
        "values_from_glob": "/.cloudcannon/structures/boardMember.cloudcannon.structure-value.yml",
        "values": [
          {
            "label": "Employee",
            "value": {
              "name": null,
              "title": null,
              "profile_picture": null
            }
          },
          {
            "label": "Manager",
            "value": {
              "name": null,
              "title": null,
              "profile_picture": null,
              "url": null
            }
          }
        ]
      }
    }
  }
}
Examples:

In this example, the staff Array Input uses inline Structure values from the main Configuration File and also references another value from the boardMember.cloudcannon.structure_value.yml in the /.cloudcannon/structures/ folder.

Copied to clipboard
_inputs:
  staff:
    type: array
    options:
      structures: 
      values_from_glob: /.cloudcannon/structures/boardMember.cloudcannon.structure-value.yml
      values:
        - label: Employee
          value:
            name: 
            title: 
            profile_picture: 
        - label: Manager
          value:
            name: 
            title: 
            profile_picture: 
            url:
{
  "_inputs": {
    "staff": {
      "type": "array",
      "options": {
        "structures": null,
        "values_from_glob": "/.cloudcannon/structures/boardMember.cloudcannon.structure-value.yml",
        "values": [
          {
            "label": "Employee",
            "value": {
              "name": null,
              "title": null,
              "profile_picture": null
            }
          },
          {
            "label": "Manager",
            "value": {
              "name": null,
              "title": null,
              "profile_picture": null,
              "url": null
            }
          }
        ]
      }
    }
  }
}
Copied to clipboard
label: Board
value:
  name: 
  title: 
  profile_picture: 
  url: 
  description:
{
  "label": "Board",
  "value": {
    "name": null,
    "title": null,
    "profile_picture": null,
    "url": null,
    "description": null
  }
}
Open in a new tab