Amreus

>From experience I can say don't worry about the more efficient just design 
for understanding. You can look at more efficient methods later if you get 
performance problems (unlikely)

I write all my templates and macros to operate on current tiddler and if I 
am listing, I typically let the currentTiddler variable change; I then have 
templates always contain

{{||templatename}} which acts on current tiddler.

In your examples
<<formatting_macro <<currentTiddler>>>>
is incorrect
<$macrocall $name=formatting_macro paramname=<<currentTiddler>>/>
will work
However you can use just 
<<formatting_macro>>
and inside it refer to $(currentTiddler)$ rather than pass it.

I am not sure your intuition is correct, it is inside the list that you are 
iterating multiple times, its when you call the macro or transclude the 
template that what it contains is evaluated, and only that. 

Regards
Tony


On Thursday, 27 August 2020 07:21:01 UTC+10, amreus wrote:
>
>
> Working on my genealogy wiki where each person is a tiddler.  Obviously my 
> wiki has lists of people all over the place - parents list, lists of 
> children, siblings, etc.
>
> In my lists I want to link to the person, but also show some other fields 
> such as year of birth. Something similar to:
>
>     Bill Henderson (1912 - 1974)
>
> Now to the question.  To accomplish this, there appear to be 2 obvious 
> ways to generate the output:
>
> 1) {{<currentTiddler>||someTemplate}}
> 2) <$list filter="..."><<formatting_macro <<currentTiddler>>>></$list>
>
> Not knowing the internals of TiddlyWiki, I might assume using a macro 
> would be more efficient since it only deals with exactly what is passed 
> whereas the template transclusion would parse the entire tiddler each time? 
> Is my intuition correct?  Are there better ways to do this? Is there a best 
> way? Thanks.
>
>
>
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/98134053-c1ad-487e-9006-7e1988b1b8b4o%40googlegroups.com.

Reply via email to