Hi Tristan,
Your English is great -- the documentation is indeed short and abstract.
I've never had much luck passing things to a javascript macro without using
a <$set> variable. I'm thinking it might be possible to use another
standard macro to wrap the <$set> process.
Could you provide the javascript macro and template for testing purposes?
Mark
On Wednesday, April 13, 2016 at 8:26:20 AM UTC-7, Tristan Kohl wrote:
>
> Hey guys,
>
> i started creating my e-book management with TW a couple days ago. But
> there are still some things I do not get right away so I hope you can help
> me out with them.
>
> First a short explanation of my "design": I have a template tiddler which
> is used to show the details of a book. In this template a call my custom
> macro to make a comma separated list of links from a field with comma
> separated author names. So i.e. field "authors" contains *Mark Twain* and
> *J.R.R.
> Tolkien* separated by comma. My macro produces links like *[[Mark
> Twain]], [[J.R.R. Tolkien]]* so I can find books for every author via
> backlinks.
>
> My problem is that I can not figure out, how to use the value of "authors"
> within my JavaScript macro. At the moment I use the *set* widget to
> create a variable authors:
> <$set name=authors value={{!!authors}}><$macrocall $name="linklist" field=<
> <authors>> /></$set>
>
> But this looks like overkill for me and is not that readable, so I wonder
> if it Is possible to replace this whole setup with something like (which
> does not work for me):
> <<linklist {{!!authors}}>>
>
> There is another question that bothers me. As I am not a native English
> speaker I do not get the difference between substitution and transclusion.
> I figure one is *before* the macro call and the other one *after* that?
> But which is when and how do I use substitution at all? Unfortunately the
> documentation is very short and abstract about this I feel.
>
> Thanks for your help
> Tristan
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/2efece31-0525-44f2-810d-a50192eeff63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.