Skip to content

How to add variables in tags #5631

Answered by pmario
davidbeijinho asked this question in Q&A
Discussion options

You must be logged in to vote

It's better to use the "actions" parameter for buttons. It will update all parameters if the button is clicked.

If the actions are inside the button, the parameters are updated, when the button is rendered.

\define myActions()
  <$action-sendmessage $message="tm-new-tiddler" title="This is newly created Task" tags="[[$(todayDate)$]] task other" text=<<todayDate>>/>
\end

<$set name="todayDate" value=<<now "DD MMM YYYY">>>
  <$button class="tc-btn-invisible" actions=<<myActions>> >
    New task for today
  </$button>
</$set>>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@davidbeijinho
Comment options

Answer selected by davidbeijinho
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