There are 3 ways I prefer to use macros. 1) A macro call is part of the tiddler text eg: <<list filter [tag[myTag]]>> which will create a "dynamically" updated list of tiddlers, that are tagged myTag. So there is no need for the author, to create a new list like * tiddler 1 * tiddler 2 ... everytime a new tiddler is tagged myTag. For a macro used in this way, imo it makes no sense to populate a new tiddler with text. Since the author needs to write the text. You can have a look at my HelloWorld space to get some working examples, for basic macro usage. [1]
2) most macros can be called within a Template eg: ViewTemplate, EditTemplate, PageTemplate. If you want to write a macro, that is part of every tiddler, you'd better use this approach. HelloWorldNamedParamsPlugin [2] documentation section describes, how to use this macro with eg: ViewTemplate. Also have a look a the Test... tiddlers. 3) Transcluding some "template text" into a new tiddler with the <<tiddler xxx with: param1 >> macro. Where param1 can be evaluated "code". (evaluated macro parameters are deactivated at TiddlySpace, due to security restrictions) see link [3] which opens 3 examples. There are backlinks to google group discussions, that may contain some more info. using <script label ...></script> you'll need InlineJavascriptPlugin [4] >My question is the same one that has bee asked for years now: How do I >invoke a tiddler populated with text, controls, etc? Hopefully there >is a generally recognized standard for this? I hope the above 3 different workflows, will solve some of your problems or at least give you some usefull hints :) have fun! -mario [1] http://helloworld.tiddlyspace.com/#HelloWorldButtonPlugin [2] http://helloworld.tiddlyspace.com/#HelloWorldNamedParamsPlugin [3] http://hoster.peermore.com/recipes/TeamWork/tiddlers.wiki#%5B%5BNewTiddler%20with%20prototype%20text%5D%5D%20%5B%5BNewTiddler%20with%20DateAndTime%5D%5D%20%5B%5BCreate%20New%20Tiddler%20with%20a%20transcluded%20script%5D%5D [4] http://www.tiddlytools.com/#InlineJavascriptPlugin -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" 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/tiddlywikidev?hl=en.
