Using wikified text from another tiddler as state in $reveal

32 views
Skip to first unread message

Melvin

unread,
Sep 17, 2019, 10:17:51 AM9/17/19
to tiddl...@googlegroups.com
I have a Tiddler called $:/dayofweek which has the following content.
<<now DDD>>

In my journal tiddler called questionnaire the following happened.

I hoped that the following code would work (on any given Tuesday).

<$reveal type="match" state="$:/dayofweek" text="Tuesday">
Yay!
</$reveal>

But it didn't. The culprit was shown when I rewrote it to the following code:
<$reveal type="match" state="$:/dayofweek" text="<<now DDD>>">
Nawhh :(
</$reveal>

So how do I make sure that reveal is matching it with the wikified version of <<now DDD>> and not the literal string?

Melvin

unread,
Sep 17, 2019, 10:40:29 AM9/17/19
to TiddlyWiki
Well, this seems to work. I suppose with the string parsing functions, one could use the list widget as a reveal widget in certain situations.

<$wikify mode="inline" name=week_val text=<<now DDD>> >
<$list filter="[
<week_val>regexp[Tuesday]]">
Yay!
</$list>
</$wikify>

Melvin

unread,
Sep 17, 2019, 11:09:15 AM9/17/19
to TiddlyWiki
It bears to mention that some tags will be different due to wikify. I had to use <<storyTiddler>> all of a sudden. I made the mistake that <<currentTiddler>> and <<storyTiddler>> would still be the same.


On Tuesday, September 17, 2019 at 4:17:51 PM UTC+2, Melvin wrote:
Reply all
Reply to author
Forward
0 new messages