What works: 1.
A "normal" macro \define d1jpg(filename) [img[./path/$filename$.jpg]] \end called like this <<d1jpg "$(currentTiddler)$">> where "$(currentTiddler)$" is replaced by the title of the calling tiddler. 2. A javascript macro /*\ title: $:/macros/mine/pathtype.js type: application/javascript module-type: macro <<pathtype $filename$>> Example: <<pathtype "20150331_195734.mp4#t=0,17">> \*/ (function(){ /*jslint node: true, browser: true */ /*global $tw: true */ "use strict"; exports.name = "pathtype"; exports.params = [ { name: "filename" } ]; /* Run the macro */ exports.run = function(filename) { return filename; }; })(); called with a "normal" string as parameter like this <<pathtype "20150331_195734.mp4#t=0,17">> ------ What's not working (or not working as expected / wanted): A js macro like the above called with wikitext variable (currentTiddler) like <<pathtype "$(currentTiddler)$">> because the variable is not resolved to it's value, but it's name treated as string. --> Question: What to change either in the call or in the js-macro so that the currentTiddler variable is resolved to the title of the tiddler within the js function? Thanks for your patience, I am still struggling with the wiki syntax. Kind regards. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at http://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/143c155b-5999-4a96-8f18-c95009ddc94b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.