mProjectsCode / mProjectsCode/obsidian-meta-bind-plugin

Button Template variables/args

Open
#645 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
1k
Forks
86
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files or tests; start by locating the inline button-template entry point and checking how template values and command arguments are currently handled. Done means reusable button templates accept one or more supplied arguments in labels and JavaScript action arguments, covering the shown use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.