> I really appreciate your suggestion, however in this time I'd prefer
> to use a macro syntax because it can be used to work with other plugin
> (like fET, sorry...).
fET is just a simple tiddler selection/looping function that triggers
*javascript* code fragments to perform the desired actions (such as
generating and rendering output). Thus, my suggested code is
absolutely applicable for use with fET.
In fact, given the amount of javascript code that already must be
passed as parameters to fET, it would be relatively easy to skip using
fET entirely, and just write pure javascript that combines the various
fET code fragments with simple code to select a set of tiddlers and
loop over them. For example, a common fET usage is to act on a set of
tiddlers with a given tag. Written as pure script:
<script>
var out=""; // buffer to hold generated output
var tids=store.getTaggedTiddlers("SomeTag","excludeLists");
for (var i=0; i<tids.length; i++) {
var tiddler=tids[i];
// code that acts on current "tiddler" object goes here
// generated output is appended to "out" variable
out += "some stuff like "+tiddler.title+" or other tiddler-
related values";
}
return out; // return the buffer content to render the output
</script>
enjoy
-e
--
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.