redirect concept for consideration

12 views
Skip to first unread message

M)

unread,
Jan 21, 2009, 11:35:35 PM1/21/09
to TiddlyWiki
I have an interesting concept that seems promising and doesn't seem to
have been mentioned in the group. Have a look.

In TiddlerA I have a link to TiddlerB. TiddlerB contains only
"TiddlerC". When clicking TiddlerB a RedirectPlugin opens TiddlerC
with "redirected from TiddlerB" at the top. Upon clicking TiddlerB in
this statement, it opens TiddlerB without initiating the redirect or
it opens it in edit mode (what ever works).

I like the idea of opening TiddlerB without initiating the redirect
because references can be scoped out.

The "simple redirect macro" discussion in 2006 is close, but has a
problem with it.
http://groups.google.com/group/TiddlyWiki/browse_thread/thread/b47875d4940c7bc4/1fc2d29ba628ee89?lnk=gst&q=redirect+wikipedia#1fc2d29ba628ee89

Can this concept turn into a working solution?

Eric Shulman

unread,
Jan 22, 2009, 3:25:45 AM1/22/09
to TiddlyWiki
> In TiddlerA I have a link to TiddlerB.  TiddlerB contains only
> "TiddlerC".  When clicking TiddlerB a RedirectPlugin opens TiddlerC
> with "redirected from TiddlerB" at the top.  Upon clicking TiddlerB in
> this statement, it opens TiddlerB without initiating the redirect or
> it opens it in edit mode (what ever works).

First, put an inline script [1] in TiddlerB, like this:

<script>
var here=story.findContainingTiddler(place);
var tid=here.getAttribute('tiddler');
var alt='TiddlerC';
if (!story.getTiddler(alt))
{ story.displayTiddler(here,alt); story.closeTiddler(tid); }
else
{ story.closeTiddler(alt); }
</script>

What the script does:

If TiddlerC is not already displayed when the script in TiddlerB is
rendered, then TiddlerC is automatically displayed and TiddlerB is
closed. Otherwise, TiddlerC is closed, leaving TiddlerB visible.
Thus, either TiddlerB or TiddlerC will be displayed, but not both. Of
course, TiddlerC should contain the desired message and link back to
TiddlerB to complete the 'round-trip'...

enjoy,
-e

[1] requires http://www.TiddlyTools.com/#InlineJavascriptPlugin

M)

unread,
Jan 22, 2009, 10:48:39 AM1/22/09
to TiddlyWiki
Unfortunately, without "TiddlerC" in TiddlerB, 'references' will not
be populated with TiddlerB. :-(

Also, it doesn't work with the single page mode plugin. :-(

To tweak concept to demonstrate a possible option...

In TiddlerA I have a link to TiddlerB. TiddlerB contains only
"TiddlerC". When clicking 'TiddlerB' in TiddlerA, TiddlerC opens.
When clicking on references>TiddlerB in TiddlerC, TiddlerB opens and
doesn't redirect.

M)

unread,
Jan 22, 2009, 11:17:21 AM1/22/09
to TiddlyWiki
We'll, I've just solved my problem.

When TiddlerB contains <<TidderC>>, the reference in TiddlerC does
point back to TiddlerB. Even for [[pretty links]]. The only very
useful plugin to use is the TiddlerWithEditPlugin.

Eric, thanks for your time.

M)

M)

unread,
Jan 22, 2009, 11:18:25 AM1/22/09
to TiddlyWiki
Missed something in my last post...

When TiddlerB contains <<Tiddler TiddlerC>>, the reference in TiddlerC
Reply all
Reply to author
Forward
0 new messages