Issue: Placeholders not working when used in choice fields #188

Closed
opened 2026-10-05 02:32:20 +02:00 by adam · 2 comments
Owner

The slug is not beeing optimized when type is choice.

        {
          "title": "Permalink1",
          "name": "permalink1",
          "type": "choice",
          "choices": [
            "{{permalink}}",
            "{{title}}",
            "{{slug}}"
          ]
        },

output:
image

The slug is not beeing optimized when type is choice. ``` { "title": "Permalink1", "name": "permalink1", "type": "choice", "choices": [ "{{permalink}}", "{{title}}", "{{slug}}" ] }, ``` output: ![image](https://user-images.githubusercontent.com/97720470/150668176-789716be-f44d-4903-bb50-fbb86e82e059.png) <!-- github-sync-id:1111794082 -->
adam closed this issue 2026-10-05 02:32:20 +02:00
Author
Owner

This is by design, as this would conflict with the selected choice field its value. When we would update the permalink1 its value from the placeholder to the actual title, slug, ... value, its original value would not be selected anymore.

These placeholders are meant for content creation. If there is anything to happen once the content has already been created, this will need to be achieved by the defined actions or defining your own. Did you know you could create your own custom actions to process your content? More information at: https://frontmatter.codes/docs/custom-actions

This is by design, as this would conflict with the selected choice field its value. When we would update the `permalink1` its value from the placeholder to the actual title, slug, ... value, its original value would not be selected anymore. These placeholders are meant for content creation. If there is anything to happen once the content has already been created, this will need to be achieved by the defined actions or defining your own. Did you know you could create your own custom actions to process your content? More information at: https://frontmatter.codes/docs/custom-actions <!-- github-comment-id:1019453941 -->
Author
Owner

@estruyf Thank you for the detailed answer.

@estruyf Thank you for the detailed answer. <!-- github-comment-id:1019871710 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#188