Skip to content

Issue: Variable interpolation is not working in array/list for placeholder #752

Description

@Mikescops

Describe the bug
When using a default placeholder that is an array, the variables are not interpolated inside.

To Reproduce
Create a new field in your contenttype with the following:

               {
                    "title": "aliases",
                    "name": "aliases",
                    "type": "list",
                    "default": [
                        "post/{{slug}}"
                    ],
                    "hidden": true
                }

You should get the following:

---
title: test-title
slug: test-title
aliases:
  - post/{{slug}}
---

Expected behavior
The slug variable should be rendered properly.

---
title: test-title
slug: test-title
aliases:
  - post/test-title
---

Note that using "default": "post/{{slug}}" properly renders "default": "post/test-title" so the problem is related to how array are managed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions