Hi!

the myMacro is only an example. You actually need to write your own
macro in javascript.
To get the tiddler text, you need to use the following:
var text = store.getTiddlerText("YourTiddlerName");

Then you can use the text variable further on. Check out a random
tiddlywiki plugin to see how the macros are declared.

Perhaps some other javascript guru can write a more detailed
explanation.

As an alternative plan, however, perhaps you can use the
forEachTiddlerPlugin (1) and simple transclusions:

In tiddler called "Lists" (or whatever you wanna call it), put:
!Base
<<forEachTiddler where 'tiddler.tags.contains("myTag")'
write '"<<tiddler [["+tiddler.text+"##Base]]>\>\n"'>>
!Annotations
<<forEachTiddler where 'tiddler.tags.contains("myTag")'
write '"<<tiddler [["+tiddler.text+"##Annotations]]>\>\n"'>>
!Macro
<<forEachTiddler where 'tiddler.tags.contains("myTag")'
write '"<<tiddler [["+tiddler.text+"##Macro]]>\>\n"'>>

In another tiddler, put this:
<<tabs txtMyTabs "Base" "Base" "List##Base" "Annotations"
"Annotations" "List##Annotations" "Macro" "Macro" "List##Macro">>

That way you have three tabs and each contains certain content. If I
understood correctly what you wanted, of course. :D And I'm sure there
are other solutions.

(1) http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin

w

On Jun 22, 8:34 am, tejjyid <[email protected]> wrote:
> A couple of things - maybe they should be separated:
>
> I was wanting to create a <<tabs>> based structure, where one tab would
> show a base text, and other tabs would show (programmatic) annotations of
> this base. I thought each tab could point to a macro with a parameter
> string which included the original base text.
> So I tried <<myMacro {{tiddler.getTiddlerText(myTiddler)}}>> 
> followinghttp://oldwiki.tiddlywiki.org/wiki/Dev:Custom_Macros, and then I 
> looked 
> athttp://tiddlywiki.tiddlyspace.com/#TiddlyWiki.prototype.getTiddlerText,
> which looked like an alternative plan, but neither worked. It seems that
> the string is never evaluated before being passed to the macro.
>
> So the 2 things are:
>
> 1.) Why are the getTiddlerText methods(?) not working, and
> 2.) Is there a pre-existing template/macro/script for doing what I want to
> do?
>
> Clarifications on request :-)
>
> Thanks in anticipation
> Andrew

-- 
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