One image for tiddlylinkexisting and another for tiddlylinknonexisting

1 view
Skip to first unread message

david.j....@gmail.com

unread,
Apr 7, 2008, 10:58:09 AM4/7/08
to TiddlyWiki
would it be possible to have a picture displayed instead of a link
such as [img[filename.jpg][TiddlerName]] but have one picture
displayed if the "target" tiddler exists and a different picture if it
doesn't exist.

Thanks,
David

Eric Shulman

unread,
Apr 7, 2008, 11:46:54 AM4/7/08
to TiddlyWiki
Using http://www.TiddlyTools.com/#InlineJavascriptPlugin, you can
write:

<script>
if (store.tiddlerExists('TiddlerName'))
return '[img[filename1.jpg][TiddlerName]]';
else
return '[img[filename2.jpg][TiddlerName]]';
</script>

enjoy,
-e
Reply all
Reply to author
Forward
0 new messages