> I'd like the script to be active in the tiddler it is invoked from.
> I thought that tiddler.title would do that for me - when I used the
> script from another tiddler with <<tiddler MyScript>>
> However it runs the script in the original tiddler instead (putting
> the script itself into the tagline!!)..

The 'tiddler' object that is provided by the core always refers to the
tiddler in which the wiki source is *stored* (the 'source tiddler'),
and is usually the same as the tiddler being *rendered* (the
'containing tiddler').  However, when you use <<tiddler>> to
transclude content from a separate TiddlerName, the source tiddler is
different from the containing tiddler.  In this case, in order to
ensure that you get the correct tiddler title and/or tiddler object,
you'll need to use the 'findContainingTiddler()' technique I
previously described:

   var here=store.findContainingTiddler(place);
   if (!here) return;
   var title=here.getAttribute("tiddler");
   var tiddler=store.getTiddler(title);

-e
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to