Hi,

to add to Tony's answer: Personally I would say it depends more on your use 
case than on efficiency.

If there are multiple instances, not just one list, where for instance you 
want to have a person formatted as given in your example with nothing ever 
changing in your formatting a template would make the most sense.

Macros  in my experience make most sense when you are handling more dynamic 
content/formatting dependent on certain parameters. As an example say you 
have instances where you only want to show a persons current name and 
others where you also want to add their birth name if married. A macro call 
can handle this without having to set a field, which would be necessary for 
a template to reference it.

If there is only one instance where you have a list and want exactly this 
formatting you could also get away with having your template between the 
beginning and end tag of the list widget, using {{!!field_name}} to 
reference the fields you want to transclude as this would reference the 
field on the currentTiddler which is whatever tiddler the listwidget is 
currently rendering. Your example would then look something like this:

<$list filter="[your_filter]">
<$link /> ({!!birth-date} - {{!!death-date}})
</$list>

Hope this helps you in some way.

Regards,
Felicia

On Wednesday, 26 August 2020 23:21:01 UTC+2, 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/1d6445a2-9385-4fa9-87ec-b069eb625d7fo%40googlegroups.com.

Reply via email to