%( op_m=1 Relations %) %( op_m=2 Relations complete (events) %) %let;op_m;%if;(op_m!="")%op_m;%else;1%end;%in; %define;relations_tree(z1) %( relations, related, witness at his event %) %reset_count; href="%prefix;spouse=on;m=RLM;image=%evar.image;;%nn; %foreach;relation; %if;(has_relation_him) %incr_count;i%count;=%relation_him.index;;%nn; t%count;=%relation_him.type;;%nn; %incr_count;i%count;=z1;%nn; %end; %if;(has_relation_her) %incr_count;i%count;=%relation_her.index;;%nn; t%count;=%relation_her.type;;%nn; %incr_count;i%count;=z1;%nn; %end; %end; %foreach;related; %incr_count;i%count;=%related.index;;%nn; t%count;=%related_type;;%nn; %incr_count;i%count;=z1;%nn; %end; %foreach;event_witness_relation; %incr_count;i%count;=%event_witness_relation.person.index;;%nn; t%count;=%event_witness_relation.event.name;;%nn; %incr_count;i%count;=z1;%nn; %end; %foreach;event; %foreach;event_witness;%nn; %incr_count;i%count;=%event_witness.index;;%nn; t%count;=%event.name;;%nn; %incr_count;i%count;=z1;%nn; %end;%nn; %end; %incr_count;i%count;=%index;;%nn; t%count;=%if;(sex=0)[him/her]0%elseif;(sex=1)[him/her]1%else;0%end;;%nn; %if;browsing_with_sosa_ref; %incr_count;i%count;=%sosa_ref.index;;%nn; t%count;=sosa_1;%nn; %end; " title="[*relations tree] ([and] [witnesses at his events])" %reset_count; %end; %reset_count; %if;(bvar.module_perso_tplnb!="" and bvar.module_perso_tplnb>0) %for;i;0;bvar.module_perso_tplnb; %apply;test_templ(i) %end; %elseif;(p_mod!="" and p_mod!="zz") %for;i;0;26; %apply;test_templ(i) %end; %end; %let;timeline;%if;(count>0)yes%else;no%end;%in; %reset_count; %( suppress relations and witnesses as they appear in timeline %) %if;(timeline="no") %if;has_relations;%incr_count;%end; %foreach;event;%if;event.has_witnesses;%incr_count;%end;%end; %foreach;family;%if;has_witnesses;%incr_count;%end;%end; %end; %foreach;related;%incr_count;%end; %foreach;event_witness_relation;%incr_count;%end; %let;rel_nbr;%count;%in; %if;(op_m=1 and has_relations) %reset_count; %foreach;relation;%if;(has_relation_him or has_relation_her)%incr_count;%end;%end; %foreach;related;%incr_count;%end; %foreach;event_witness_relation;%incr_count;%end; %let;cnt;%count;%in; %let;l_ref;%if;browsing_with_sosa_ref;%sosa_ref.index;%else;%index;%end;%in;

[*relation/relations]1%nn; %if;(cnt>0) %if;(not cancel_links) %nn; Tree%nn; %nn; %end; %end;

%( relation_complete includes witness of his events and witness at other's events %) %elseif;(op_m=2 and rel_nbr>0) %let;l_ref;%if;browsing_with_sosa_ref;%sosa_ref.index;%else;%index;%end;%in;

[*relation/relations]1 %if;(not cancel_links) Tree %end;

%reset_count; %foreach;relation; %if;(has_relation_him or has_relation_her)%incr_count;%end; %end; %foreach;related; %if;(related_type!=[godson/goddaughter/godchild]0 and related_type!=[godson/goddaughter/godchild]1 and related_type!=[godson/goddaughter/godchild]2) %incr_count; %end; %end; %foreach;related; %if;(related_type=[godson/goddaughter/godchild]0 or related_type=[godson/goddaughter/godchild]1 or related_type=[godson/goddaughter/godchild]2) %incr_count; %end; %end; %( this first heading is quite redoudant with h2 title! %) %if;(count>0)

[*relations of] %self;

%end; %reset_count; %foreach;event;%sp; %foreach;event_witness; %incr_count; %end; %end; %if;(count>0)

[*witnesses to events of] %first_name;

%end; %define;str(xxx,yyy) [*events to which %s was witness:::xxx]%nn; %end; %reset_count; %foreach;event_witness_relation; %incr_count; %end; %if;(count>0)

%apply;str(self,sex)

%end; %nl; %end;