Hi,

Since the tags field is of the list type, you need to retrieve its content
either directly from another list-typed field (that is list or tags), or
indirectly by transforming the string content into a list.

In your example, you may achieve this by first setting a variable to a
filter that converts the content of your tiddler-tag field into a list :

<$set name=mytags filter="[enlist{!!tiddler-tag}]">
<$action-sendmessage $message="tm-new-tiddler"
title=<<TIDDLER-TITLE>>
text=<<TIDDLER-TEMPLATE>>
tags=<<mytags>>/>
</$set>

Note the use of the enlist operator to transform a string into a list.
5.1.23 just introduced the enlist-input operator, which is handy in
situations where your initial string comes from a previous filter
expression.

Cheers,
-- Xavier


On Sat, Jan 2, 2021 at 3:52 PM vinvi...@gmail.com <vinvindt...@gmail.com>
wrote:

> Hello,
>
> I have a button to create a new tiddler.
> With    \define TAGS() [[$(currentTiddler)$]] [[Tag 2]] [[Tag 3]],  I can
> tag the new tiddler.
>
>
> \define BUTTON-NAME() Enter >
> \define BUTTON-COLOR+SIZE() btn btn-link btn-sm
> \define BUTTON-TEXT-COLOR() color:
> \define TIDDLER-TITLE() $(currentTiddler)$ ENTER-SPECIFIC-HERE
> \define TIDDLER-TAGS() [[$(currentTiddler)$]]
> \define TIDDLER-TEMPLATE() {{||$(currentTiddler)$-SPECIFIC-TEMPLATE}}
>
> <$button type="button" class=<<BUTTON-COLOR+SIZE>>>
> <$action-sendmessage $message="tm-new-tiddler"
> title=<<TIDDLER-TITLE>>
> text=<<TIDDLER-TEMPLATE>>
> tags=<<TIDDLER-TAGS>>
> />
> <span style=<<BUTTON-TEXT-COLOR>>><<BUTTON-NAME>></span>
> </$button>
>
>
> What I want is for the button to read the tags from a field;
> tags={{!!tiddler-tag}}
>
> My problem is that [[$(currentTiddler)$]] in a field doesn't work.
>
> How do I make this work?
> Thank you,
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/b46bc104-7460-4e0a-9463-b7f90ecc6b85n%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/b46bc104-7460-4e0a-9463-b7f90ecc6b85n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CADeSwYMT-w1zxbpDM0e8LZtD1q%2BuPRp8Qmr9XtBU25mvNASFyg%40mail.gmail.com.

Reply via email to