Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Mikescops opened this issue Feb 11, 2024 · 5 comments
Closed
Labels

Comments

@Mikescops
Copy link

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.

@Mikescops Mikescops added the bug Something isn't working label Feb 11, 2024
@estruyf
Copy link
Owner

estruyf commented Feb 12, 2024

Thanks, @Mikescops; this is indeed not yet supported, but let us make it happen! 💪

@estruyf
Copy link
Owner

estruyf commented Feb 12, 2024

@Mikescops was added and is testable in the latest beta version.

@Mikescops
Copy link
Author

@Mikescops was added and is testable in the latest beta version.

sounds like it broke the normal string interpolation 😓

image image

estruyf added a commit that referenced this issue Feb 12, 2024
@estruyf
Copy link
Owner

estruyf commented Feb 12, 2024

That is correct 🤦‍♂️, should be better with the new fix

@Mikescops
Copy link
Author

Much better, thanks!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants