> I just discovered a useful trick to create a redirect > (fromhttp://groups.google.com/group/TiddlyWiki/browse_thread/thread/7f9bb7...)... > > When TiddlerB contains <<Tiddler TiddlerC>>, TiddlerB will present > TiddlerC content, thus performing like a redirect.
The action performed by the <<tiddler>> macro is called "transclusion"... for it to be considered "redirection", you would have to actually end up viewing TiddlerC *in place of* TiddlerB. Nonetheless, use of transclusion as a "poor man's alternative" to redirection is still very handy.. ...and, as you requested, here's an even more powerful trick you can do with the <<tiddler>> macro... First, write something like: <<tiddler SomeTiddler with: param1 param2 param3 ...>> Then, create [[SomeTiddler]] with some content that includes special sequences "$1" through "$9" embedded in the source content. These are used as "substitution markers" automatically insert the corresponding values from param1, param2, param3,... when the tiddler is transcluded via the above macro. One really convenient use of this "tiddler with params" syntax is to quickly define some pre-formatted tiddler content that can then be easily transcluded into other tiddlers as a sort of "instant macro"... For example, suppose we have a directory of photos containing full- sized JPG files, each with a corresponding "thumbnail" image stored as a separate JPG file with "thumb_" as a prefix on the filename. Further suppose that we want to create a 'gallery' of thumbnails, each with a click-through link to the full-sized image and a small caption beneath, to make it easy to review these photos. First create a tiddler containing the desired formatting for a single 'linked thumbnail with caption' display, e.g., [[ThumbThing]]: [img[images/thumb_$1.jpg][images/$2.jpg]] $3 Then, create another tiddler called [[ImageGallery]] containing something like: <<tiddler ThumbThing with: photo1 "some words here">> <<tiddler ThumbThing with: photo2 "other words here">> <<tiddler ThumbThing with: photo3 "blah blah blah...">> ...etc. That's it. Opening the [[ImageGallery]] tiddler automatically renders [[ThumbThing]] multiple times, using a different photo filename each time to produce a combined display of all thumbnails, complete with captions, ready for quick review and click-through to the full-sized photos (as external links directly to the JPG files). 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 [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 -~----------~----~----~----~------~----~------~--~---

