Hi Eric, thanks for that script.  I'm going with:

<script>
return "+++[.] [[notes"+tiddler.title+"]] <<tiddler
[[notes"+tiddler.title+"]]>>===";
</script>

because I can just plunk it in to any tiddler and the Notes tiddler
for that is already there to click on (just empty at first)

Here's the twist I'm not sure how to get around:

The small tiddler this script is in, is itself part of a larger
tiddler that is including (via <<tiddler TiddlerName>>) it.  And, to
boot, I'm using Saq's TiddlerWithEdit plugin that allows me to double
click on the "included" small tiddler within the bigger one and go to
edit the small one directly.  So when I click on the note for that
small tiddler I can add notes to it and see it there, but when I go
back to the bigger tiddler and view it, the same script in that one
thinks "tiddler.title" is referring to that big tiddler and not the
original small one.

any suggestions?

thanks again,
Dave

On Mar 3, 11:12 am, Eric Shulman <elsdes...@gmail.com> wrote:
> > <script>
> > write
> >  '"+++[.] [[notes"+tiddler.title+"]]"+"<<tiddler
> > "+"[[notes"+tiddler.title+"]]"+"\>\>==="'
> > </script>
>
> > the error I get is:
> > ReferenceError: write is not defined
>
> There are several ways to render the output from an inline script.
> The easiest method is to simply *return* the wiki-formatted text that
> you want to have rendered, like this:
>
> <script>
> return "+++[.][[notes"+tiddler.title+"]]<<tiddler
> [[notes"+tiddler.title+"]]>>===";
> </script>
>
> Note: for simple substitutions of values such as "tiddler.title", you
> could also just use the <<tiddler>> macro with a computed parameter...
>
> First, create the tiddler to be transcluded (e.g., [[AddNotes]]), with
> content like this:
>    +++[.][[notes$1]]<<tiddler [[notes$1]]>>===
>
> Then, embed it in other tiddler content like this:
>    <<tiddler AddNotes with: {{tiddler.title}}>>
>
> When rendered from a tiddler called "FooBar", this will produce:
>    +++[.][[notesFooBar]]<<tiddler [[notesFooBar]]>>===
>
> QED.
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to TiddlyWiki@googlegroups.com
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to