On Friday, April 15, 2016 at 6:18:19 AM UTC-7, Martian wrote:
Hello!
* <<current>> is not a pre-defined variable, so it has no assigned value. The TWCore sets <<currentTiddler>> to title of the current tiddler. Perhaps that is the variable you were thinking of
* The syntax for defaults for macro params is paramname:value (not paramname=value) and only accepts literal values surrounded by delimiters using single-quotes ('foo'), double-quotes ("foo"), doubled square brackets ([[foo]]), or tripled double quotes ("""foo"""). You can't use a reference to another variable (or a transcluded field value).
* You declare the 'title' param, but never *use* it in the macro definition, so it's not clear what you intend to use it for.
* invoking <<getfoo>> here returns "{{foo1!!code}}", which is then rendered as a transclusion, displaying the value in the specified field
[[{{foo1!!code}}]]
[[<<getfoo>>]]
* you can't use transclusion or variable/macro invocation *within* the link syntax.
* the macro returns "{{foo1!!code}}" and is not recursively re-parsed to retrieve the value contained in that field. Thus, you are linking to a tiddler whose title is literally "{{foo1!!code}}".. which, is very likely NOT what you intended.
* This will work... but only links a tiddler whose title is the value in the field, without adding your desired title prefix (e.g., "sometext-"
* You cannot invoke a widget to assign a value to a macro param. Widgets generate/render output. They do not return values.
Hope this helps,
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios