Skip to content

Button Template variables/args #645

@LastElf

Description

@LastElf

Please fill out these Check-boxes

  • I checked for existing similar feature requests
  • I have read the docs and checked that the feature I am requesting is not already implemented
  • My feature request consists of only one feature

Is your Feature Request related to a Problem or Annoyance?

The short version is I'm annoyed that I can't pass an argument to a button template which fills in part of the template

Describe the Feature you'd like

The ability to pass an/many args to an inline button template, ala BUTTON[template][15] where 15 is something I can pass to a command argument or part of the template

And then template could look something like

style: default
label: DC {{arg1}} Perception
action:
  type: js
  file: script/request_dc.js
  args:
    dc: {{arg1}}

Alternatives

No response

Additional Context

The context behind this is wanting to be able to set up a clickable trigger in a TTRPG note that makes a REST query. The REST part can easily be a js function and I'll deal with the complexity involved in making it talk to my endpoint, I just want to be able to make a template that I can reuse with one or two changes per instance of the template being used without having to re-make it multiple times per note just for the js argument to pass through in the REST body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions