Hi Smandoli,

Double curly brackets are only intended to be used in wiki markup.
Used the way you do, they result in invalid javascript code. All you
need there are quotation marks and you also don't need to split those
ending greater-thans! This workaround is only needed if you work with
TRANSCLUSION via the tiddler macro, but not when you write your own
plugin.

On the other hand, if you have two use cases, you should wrap your two
methods in some if / else clause.

Cheers, Tobias.

On 8 Jan., 21:25, Smandoli <[email protected]> wrote:
> My macro "relevantlink" loads with the error "invalid property id".
> It's because of the last wikify call, where I want to embed my "Bbl"
> macro and I'm trying to use the evaluation tags (double curly
> parenteses).
>
> Solution?
> //{{{
> config.macros.relevantlink={
>    handler:
> function(place,macroName,params,wikifier,paramString,tiddler) {
>         var book = params[0];
>         var chap = params[1] || 1;
>         var vs = params[2] || 1;
>         var link;
>
>    //  METHOD A
>         link = book+"-"+chap+"-"+vs;
>         link = "[["+link +"]]";
>         wikify(link, place);
>
>    //  METHOD B  uses my own macro to construct the link
>         link = book+" "+chap+" "+vs;
>         wikify({{"<<Bbl " + link + " >" + ">"}}, place);
>
>    }
>  };
> //}}}

-- 
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.

Reply via email to