Skip to content

Is there a way to prompt for a variable and insert it into a template? #61

Answered by stdword
thatdwayne asked this question in Q&A
Discussion options

You must be logged in to vote

Hello!
There is no way to prompt variable via UI. I wanted to implement it, but Logseq has changed it's way of development the application. So no UI prompting for now.

But there are workarounds. You can configure the template with arguments OR property arguments.

Demo for arguments:

Note important template-usage property.

Code

- template:: test
  template-usage:: `:person [[{|}]]`
    - ## ``[c.args.person]``
        - ``'{{query (AND (todo todo doing later now)'`` ``[c.args.person]`` ``') }}'``

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by stdword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants