[tw] Re: Javascript in ViewTemplate (or other ...Template)

2011-03-30 Thread Eric Shulman
in ViewTemplate. The tricky bit is how to refer to the tiddler which so transcludes the script, within the script (if you need that). Given the use of InlineJavascriptPlugin it can be done with something like var transcludingTiddler = place.parentNode.parentNode; var transcludingTiddlerTitle

[tw] Re: Javascript in ViewTemplate (or other ...Template)

2011-03-30 Thread PMario
On Mar 30, 2:36 pm, Kosmaton kosma...@gmx.com wrote: Seems to work well. Maybe there are less macgyvery solutions though? Jup. Since you used the tiddler macro to call a tiddler, that contains a script, You could use a real macro. See how this works at my helloworld space [1]. All macros can be

[tw] Re: Javascript in ViewTemplate (or other ...Template)

2011-03-30 Thread Kosmaton
Thanks all! @whatever: no, the script is the bit /being/ transcluded. @Eric: cool, very useful functions. @Mario: you're right, making it as a new macro is a lot cleaner. Much better now :) =K= -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To

[tw] Re: Javascript in ViewTemplate?

2011-03-28 Thread axs
You could try the HideWhenPlugin [1] in your Templates to selectively display/hide contents based on various tiddler fields. It *would* be useful to be able to use script tags in Templates, but I haven't figured out how to get that working yet. I just use HideWhenPlugin for now... regards,