question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancement: setting variables for contentTypes fields in template defintion

See original GitHub issue

First at all, a really nice project. I appreciate using this extension.

For now i don´t have understand how to use variables in the frontmatter conent-type definition. When creating a new content the title: and slug: are filled with the name of the filename. The article.md template file has two variable definitions. Example:

title: "{{name}}"
slug: "/{{kebabCase name}}/"

Is it somehow possible to define this variable for other taxonomy content types.

Example:

title: "{{name}}"
slug: "/{{kebabCase name}}/"
permalink: "{{name}}"

For now only the title: and slug: has the filename filled out.

title: created filename
slug: created-filename
permalink: '{{name}}'

How can i resolve this?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
estruyfcommented, Jan 20, 2022

Latest applied fix will resolve this issue.

1reaction
wemasoecommented, Jan 18, 2022

Choice fields and taxonomy fields cannot be used like this. They can only be used to select a predefined value.

Can you try to explain your use case or how you want to use it?

i just played around and tried some things out to check how dynamic the placeholder and variables are in the dashboard.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Custom Content Types and Fields with Twig - Drupal
Quick reference for creating custom types, and fields, and how they are accessed ... Discovering and Inspecting Variables in Twig Templates ...
Read more >
Variables supported in HTML document templates
Include customized variables in a document template in addition to the variables that are available in the Select Variables field in the HTML ......
Read more >
16. Job Templates — Ansible Tower User Guide v3.8.6
A job template is a definition and set of parameters for running an Ansible job. ... documented in the Ansible documentation, Defining variables...
Read more >
Using Templates - OpenAPI Generator
OpenAPI Generator supports user-defined templates. This approach is often the easiest when creating a custom template.
Read more >
NetSuite - Syntax for Advanced Template Fields
Map & Contact Content Type · Add a Map and Contact Information ... Contact Form Content Type ... Setting Up Values for Substitution...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found