And if you want a link to a tiddler by the new name
{{{ [<currentTiddler>split[ ]join[_]] }}}
Just to fill out Eric's comprehensive answer.
Tony
On Tuesday, June 16, 2020 at 11:17:55 AM UTC+10, Eric Shulman wrote:
>
> On Monday, June 15, 2020 at 5:36:00 PM UTC-7, Ankit Mittal wrote:
>>
>> I have been trying to get a variable set such that it has the title of
>> current toddler without spaces. I tried following but it did not work...
>>
>> \define testCreate()
>> <$set name=test filter=""" <<currentTiddler>> +[join[_]] """>
>> <<test>>
>> </$set>
>>
>> \end
>>
>> <<testCreate>>
>>
>> If title of current tiddler is "Hello There Abbey", I was hoping above
>> macro would result in Hello_There_Abbey but it did not.
>>
>
> Try this:
> <$set name="test" filter="[<currentTiddler>split[ ]join[_]]">
> <<test>>
> </$set>
>
> You can also achieve the same results with the <$vars> widget, using an
> "inline filter", like this:
> <$vars test={{{ [<currentTiddler>split[ ]join[_]] }}}>
> <<test>>
> </$vars>
>
> and, if you just want to *display* the value, you don't even need the
> $vars. Just write:
> <$text text={{{ [<currentTiddler>split[ ]join[_]] }}}/>
>
> enjoy,
> -e
>
--
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/3df10438-d968-4ea5-81c1-472bce624cbfo%40googlegroups.com.