[tw5] Re: Siblings Macro
I lied - I couldn't wait to try.. @Eric I see your macro does not change the sort order. It looks like it's going to work great. Thanks again. On Wednesday, August 12, 2020 at 11:01:30 PM UTC-4 amreus wrote: > Thanks Eric. I should have also mentioned I want to keep the birth order > of the siblings based on a `birt-date` field. I won't have a chance to try > any of this until late tomorrow. > > > On Wednesday, August 12, 2020 at 10:30:36 PM UTC-4 Eric Shulman wrote: > >> On Wednesday, August 12, 2020 at 5:48:17 PM UTC-7, amreus wrote: >>> >>> I have a little macro that lists the siblings of a person tiddler. >>> Simplified, it looks like so: >>> \define siblings() >>> ''Siblings'' >>> <$list filter="[has[famc]field:famc{!!famc}]"> >>> <$link>{{!!caption}} >>> >>> \end >>> This lists all tiddlers that have a matching `famc` field, including the >>> current tiddler. >>> How can I make it not link to the current tiddler? >>> I want to list and link to the siblings, but only list the current >>> tiddler with no link. >>> >> >> Try this: >> \define siblings() >> ''Siblings'' >> <$vars here=<>> >> >> <$list filter="[has[famc]field:famc{!!famc}]"> >> >> >><$list filter="[match]"> {{!!caption}} >> >><$list filter="[!match]"> <$link>{{!!caption}}> $link> >> >> >> \end >> >> > -- 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/82667c6c-f3cf-4451-913e-ad54ccc648d5n%40googlegroups.com.
[tw5] Re: Siblings Macro
Thanks Eric. I should have also mentioned I want to keep the birth order of the siblings based on a `birt-date` field. I won't have a chance to try any of this until late tomorrow. On Wednesday, August 12, 2020 at 10:30:36 PM UTC-4 Eric Shulman wrote: > On Wednesday, August 12, 2020 at 5:48:17 PM UTC-7, amreus wrote: >> >> I have a little macro that lists the siblings of a person tiddler. >> Simplified, it looks like so: >> \define siblings() >> ''Siblings'' >> <$list filter="[has[famc]field:famc{!!famc}]"> >> <$link>{{!!caption}} >> >> \end >> This lists all tiddlers that have a matching `famc` field, including the >> current tiddler. >> How can I make it not link to the current tiddler? >> I want to list and link to the siblings, but only list the current >> tiddler with no link. >> > > Try this: > \define siblings() > ''Siblings'' > <$vars here=<>> > > <$list filter="[has[famc]field:famc{!!famc}]"> > > ><$list filter="[match]"> {{!!caption}} > ><$list filter="[!match]"> <$link>{{!!caption}} $link> > > > \end > > -- 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/5ae59856-474d-4431-a7cf-884a0761ddfcn%40googlegroups.com.
[tw5] Re: Siblings Macro
Thanks Tony - I actually want to list the tiddler just not display it as a link since in theory I am already viewing that tiddler. Plus showing the person in plain text acts as a hint to where in the birth-order the person is. On Wednesday, August 12, 2020 at 10:27:31 PM UTC-4 TW Tones wrote: > Amerus > > Here is a somplified version which excludes the current tiddler > > \define siblings() > ''Siblings'' > <$list filter="[all[]famc{!!famc}] -[]"> > > <$link>{{!!caption}} > > \end > untested > > It uses the short form of fieldname[fieldvalue] to test a fields value, > and gets this value from the field in the current tiddler. > > > Regards > Tones > > > > > On Thursday, August 13, 2020 at 10:48:17 AM UTC+10, amreus wrote: >> >> >> I have a little macro that lists the siblings of a person tiddler. >> Simplified, it looks like so: >> >> \define siblings() >> ''Siblings'' >> <$list filter="[has[famc]field:famc{!!famc}]"> >> <$link>{{!!caption}} >> >> \end >> >> This lists all tiddlers that have a matching `famc` field, including the >> current tiddler. >> >> How can I make it not link to the current tiddler? >> >> I want to list and link to the siblings, but only list the current >> tiddler with no link. >> >> >> -- 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/7b4f7b63-3a4b-48f3-b038-0c57a22201f1n%40googlegroups.com.
[tw5] Re: Siblings Macro
On Wednesday, August 12, 2020 at 5:48:17 PM UTC-7, amreus wrote: > > I have a little macro that lists the siblings of a person tiddler. > Simplified, it looks like so: > \define siblings() > ''Siblings'' > <$list filter="[has[famc]field:famc{!!famc}]"> > <$link>{{!!caption}} > > \end > This lists all tiddlers that have a matching `famc` field, including the > current tiddler. > How can I make it not link to the current tiddler? > I want to list and link to the siblings, but only list the current tiddler > with no link. > Try this: \define siblings() ''Siblings'' <$vars here=<>> <$list filter="[has[famc]field:famc{!!famc}]"> <$list filter="[match]"> {{!!caption}} <$list filter="[!match]"> <$link>{{!!caption}} \end -- 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/711f3ec4-22f4-4c39-b16c-ca10b3da6fc0o%40googlegroups.com.
[tw5] Re: Siblings Macro
Amerus Here is a somplified version which excludes the current tiddler \define siblings() ''Siblings'' <$list filter="[all[]famc{!!famc}] -[]"> <$link>{{!!caption}} \end untested It uses the short form of fieldname[fieldvalue] to test a fields value, and gets this value from the field in the current tiddler. Regards Tones On Thursday, August 13, 2020 at 10:48:17 AM UTC+10, amreus wrote: > > > I have a little macro that lists the siblings of a person tiddler. > Simplified, it looks like so: > > \define siblings() > ''Siblings'' > <$list filter="[has[famc]field:famc{!!famc}]"> > <$link>{{!!caption}} > > \end > > This lists all tiddlers that have a matching `famc` field, including the > current tiddler. > > How can I make it not link to the current tiddler? > > I want to list and link to the siblings, but only list the current tiddler > with no link. > > > -- 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/4d091b64-479f-4422-b8ad-b4cdfa0fa193o%40googlegroups.com.