setvars, random and tiddlers with spaces in their names

56 views
Skip to first unread message

this name

unread,
Jun 1, 2017, 2:51:27 PM6/1/17
to TiddlyWiki
(using http://tobibeer.github.io/tw5-plugins/#random and http://tobibeer.github.io/tw5-plugins/#setvars)

<$setvars _r="[prefix[mytiddler]random[1]]" random="\{{\ [r] \}}\">

<
<random>>

</$setvars>

works with tiddlers called "mytiddlertext" and "mytiddlermoretext"

as soon as i add tiddlers called "mytiddlers text" and "mytiddler moretext", it stops working

is there something special i should do to cope with tiddlers with spaces in their names?

Mark S.

unread,
Jun 1, 2017, 4:23:02 PM6/1/17
to TiddlyWiki
How do you know it's not working? I'm reminded of this comic: http://dilbert.com/strip/2001-10-25

I notice that this phrase (random="\{{\ [r] \}}\") is put as (random="\{{{\ [r] \}}}\") in Tobias example. I had to make this change to your code to get multiple tiddlers to show up.

If I understand the documentation correctly, you will need to save and reload the TW in order to have the results change. When I made 3 tiddlers and saved, I was lucky enough to get one with spaces on the first reload.

If you're impatient, take out the tiddler with no spaces to force it to show that spaces will work. Or make the count 3 (this only worked after fixing your code to use 3 curly brackets).

Good luck,
Mark

this name

unread,
Jun 1, 2017, 4:51:19 PM6/1/17
to TiddlyWiki
ok i can see that three brackets shows the names of all the tiddlers, (whether there is a space in the title or not)
two brackets reveals the contents of the tiddlers only when there are no spaces in the title


Reply all
Reply to author
Forward
0 new messages