Maybe I didn't explained properly. Sorry for that.
In the example you send me, I need the call to the macro receives the 
content of a field as parameter. Like this:

<<removetag text {{myTiddler!!caption}}>>

I'll try to explain more:
If you set a username in the config, every draft opened appends 'by 
username' in the title. This username is stored in the tiddler 
$:/status/UserName. I have a button in my wiki that triggers a 
tm-new-tiddler action based on a template. This opens a tiddler for editing 
with the contents of the template, including the tag of the template 
($:/tags/template) and I want to remove it before saving the new tiddler.
But I can't send the content of $:/status/UserName as a parameter of the 
function in order to concatenate it after 'Draft of ... by'.

I know it could be easily done by typing the username in the macro (as is a 
single file and there is only one user) or simply deleting de username from 
de config, but I plan to make this wiki multi-user in the future.

Thank you!

El martes, 19 de noviembre de 2019, 18:22:46 (UTC), Mark S. escribió:
>
> This worked for me:
>
> \define removetag(type user)
> <$fieldmangler tiddler="Draft of 'Añadir $type$' by $user$" >
> <$button message="tm-remove-tag" param="TEST">Remove TEST tag</$button>
> </$fieldmangler>
> \end
>
> <<removetag text Jose>>
>
> Where the original tiddler before being opened for edit was "Añadir text" 
> Just to be clear, the tiddler needs to be opened for editing in order for 
> this to work (for it to have the name "Draft of 'Añadir text' by Jose"
>
> Good luck!
>
> On Tuesday, November 19, 2019 at 7:24:40 AM UTC-8, Littleagle Thoronaug 
> wrote:
>>
>> Hi there!
>>
>> I'm using TW5 in a single file, version 5.1.21 and I want to pass the 
>> content of a field as a parameter of a widget. I tried transcluding, using 
>> variables, using parameters of a macro but none of them seem to work. This 
>> is what I tried:
>>
>> <$fieldmangler tiddler="Draft of 'Añadir $type$' by 
>> {{$:/status/UserName!!text}}" >
>> or 
>> <$fieldmangler tiddler="Draft of 'Añadir $type$' by <<uservar>>" >
>> or
>> <$fieldmangler tiddler="Draft of 'Añadir $type$' by $(uservar)$" >
>> even
>> <$fieldmangler tiddler="Draft of 'Añadir $type$' by $user$" >
>>
>> where "user" is a parameter of a macro inside of which is the 
>> $fieldmangler widget.
>>
>> I need this to remove a tag in that Draft of using $action-sendmessage 
>> widget.
>>
>> Thanks in advance.
>>
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6c0a6ed1-0b2f-4a2d-a999-e4a8027b0f54%40googlegroups.com.

Reply via email to