Hi all,
I'd like to extend the <<list>> macro to display the icons that are
associated with tiddler. The macro <<tiddlerIcons>> is provided by
the TiddlerIconsPlugin. I believe the correct place to add this code
is:
config.macros.list.handler = function(place,macroName,params)
{
var type = params[0] ? params[0] : "all";
var list = document.createElement("ul");
place.appendChild(list);
if(this[type].prompt)
createTiddlyElement(list,"li",null,"listTitle",this[type].prompt);
var results;
if(this[type].handler)
results = this[type].handler(params);
for(var t = 0; t < results.length; t++) {
var li = document.createElement("li");
list.appendChild(li);
createTiddlyLink(li,typeof results[t] == "string" ? results[t] :
results[t].title,true);
// ***** START MY CODE *****
if(typeof results[t] == "string") {
tiddlerIcons("=" + results[t]);
}
// ***** END MY CODE *****
}
};
this causes the error: Error while executing macro <<list>>:
TypeError: tiddlerIcons is not a function
How do I call a plugin function from another macro?
Thanks,
Todd
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---