So my first task in changing over to fields was to get Tidgraph to work 
with a father field and a mother field. I spent a couple of hours on this 
trying to get Tidgraph to show the parents, but I was unable to do so. The 
only way that I have been able to get Tidgraph to do what I wanted was to 
have a parents field and the father and mother separated by a semicolon. I 
could then use a filter as the mode in Tidgraph to separate the two.  I 
really didn't care for this approach. For the time being, I'm sticking with 
the tags approach until I can figure out either a way to get Tidgraph to do 
what I'm looking to do or use Tony's suggestion of a CSS approach.

On Saturday, June 27, 2020 at 4:27:54 PM UTC-7, Damon Pritchett wrote:
>
> All,
>
> I've spent the last few days working on a new wiki for use with my family 
> history. I'm going to use it, not as a substitute for my genealogy program, 
> but as a supplement to keep track of documentation and such. In so doing, 
> I've managed to figure out a nice way of using tidgraph to generate my 
> pedigree chart and I've written a "children of" using nested list widgets. 
> I have tiddlers for each person with that person's parents as tags. With 
> tidgraph, I was able to get the desired behavior by using mode="tags[]" 
> instead of tagging which is the default. Tidgraph is a wonderful plugin and 
> it's too bad that it doesn't seem to be supported any longer. I'm still 
> learning Javascript, so am a long way from making any changes to it myself.
>
> I've created a ViewTemplate that I've included here:
> \import [title<currentTiddler>]
>
> <$list filter="[all[current]search:description[People]]">
>
> <div class="tc-tiddler-body" style="border: none;">
>
>
> <$tidgraph start=<<currentTiddler>> mode="tags[]sort[sex]reverse[]" 
> maxdepth="2" nocollapse />
>
> <$list filter="[all[current]has:field[birth]] 
> [all[current]has:field[death]]">
> <table class="highlight1">
>   <caption style="text-align: left; font-weight: bold; caption-side: 
> top;">Birth / Death:</caption>
>   <tr>
>     <td>Birth</td>
>     <td><$macrocall $name="date-str" date={{!!birth}}/></td>
>     <td><<birthplace>></td>
>   </tr>
>   <tr>
>     <td>Death</td>
>     <td><$macrocall $name="date-str" date={{!!death}}/></td>
>     <td><<deathplace>></td>
>   </tr>
> </table>
> </$list>
>
> <$list filter="[all[current]]" variable="Parent">
>
> <$list filter="[all[current]tagging[]search:description[People]limit[1]]" 
> variable=null>
>
> <div class="list-tree">
>   Children of <<currentTiddler>>:
>   <ol>
>     <$list 
> filter="[title<currentTiddler>tagging[]sortan[birth]tags[]!title<Parent>]">
>       <li>with: <$link><$view field='caption'><$view 
> field='title'/></$view></$link>
>         <$list 
> filter="[title<currentTiddler>tagging[]limit[1]has[parents-marriage]]">
>           -> married: <$macrocall $name="date-str" 
> date={{!!parents-marriage}}/>
>         </$list>
>         <ol>
>           <$list filter="[title<currentTiddler>tagging[]sortan[birth]]">
>             <li><$link><$view field='caption'><$view 
> field='title'/></$view></$link> -> born: <$macrocall $name="date-str" 
> date={{!!birth}}/></li>
>           </$list>
>         </ol>
>       </li>
>     </$list>
>   </ol>
> </div>
>
> </$list>
>
> </$list>
>
> <$list 
> filter="[all[current]backlinks[]!search:description[People]!is[missing]limit[1]]"
>  
> variable=null>
>
> <<table-dynamic 
> filter:"[title<currentTiddler>backlinks[]!search:description[People]]" 
> fields:"tbl-expand record-date description title" sortOp:sortan 
> stateTiddler:"recordsearch" class:"highlight1" editButton:no 
> caption:"''Mentioned or connected with the following records:''">>
>
> </$list>
>
>
> </div>
>
> </$list>
>
>
> The result is this:
>
>
>
> I'm suing the class "list-tree" which has been around for quite a while 
> and created by Mat. There's also a dynamic table called out from the Shiraz 
> plugin that I use to show any documents that the person is listed in.
>
> This all works just how I want it to work, but being that my skills at 
> Tiddlywiki are still forming, I'm wondering if there might be a more 
> efficient or effective way of doing the same thing. I am definitely open to 
> any better ways of doing things.
>
> I'm also thinking of expanding the "children of" code to a recursive macro 
> to get multiple generations, but I don't know exactly how to proceed down 
> that path. Any suggestions would be highly appreciated.
>
> Feel free to use this code if you think you'd find it useful. I only ask 
> that, if you make any improvements or additions, that you let me know so I 
> might incorporate those.
>
> Thanks,
>
> Damon
>
>
>
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ea516f20-35b9-4529-a751-a861a1725bc7o%40googlegroups.com.

Reply via email to