Author Topic: Individual templates question  (Read 2978 times)

0 Members and 1 Guest are viewing this topic.

Offline pmralbuquerque

  • VIP
  • Full Member
  • *
  • Posts: 24
    • View Profile
Individual templates question
« on: July 16, 2024, 11:30:55 »
Hello,

I have a custom individual template in which I'm trying to set a conditional display for BURI and CREM, but I can't get the colour markers to work, and the BURI image is missing. The code is as follows:
Code: [Select]
<td>
  <ifvalue path=INDI:BURI default path=INDI:CREM img=yes txt=no>
</td>
<td valign="top">
  <b><ifvalue path=INDI:BURI:DATE default=INDI:CREM:DATE></b>&nbsp;<br>
  <ifvalue path=INDI:BURI:PLAC:NOTE default=INDI:CREM:PLAC:NOTE max=67>&nbsp;
</td>
<td>
  <table>
    <font color=green><mark <ifvalue path=INDI:BURI:SOUR default INDI:CREM:SOUR>></font>
    <font color=red><mark <ifvalue path=INDI:BURI:SOUR default INDI:CREM:SOUR> notpresent="true"></font>
  </table>
</td>

Is this possible, please? Thank you in advance.

Regards,
Pedro
« Last Edit: July 16, 2024, 11:37:47 by pmralbuquerque »

Offline pmralbuquerque

  • VIP
  • Full Member
  • *
  • Posts: 24
    • View Profile
Re: Individual templates question
« Reply #1 on: July 16, 2024, 16:30:21 »
OK, I ended up with the following code. The only issue now is the CREM marker shows aligned with the place, instead of the date.:
Code: [Select]
<tr>
<td>
<ifvalue path=INDI:BURI img=yes txt=no>
<ifvalue path=INDI:CREM img=yes txt=no>
</td>
<td valign="top">
<b><ifvalue path=INDI:BURI:DATE default=INDI:CREM:DATE></b>&nbsp;<br>
<ifvalue path=INDI:BURI:PLAC:NOTE default=INDI:CREM:PLAC:NOTE max=60>&nbsp;
</td>
<td valign="top">
<table>
<font color=green><mark ifvalue path=INDI:BURI:SOUR></font>
<font color=red><mark ifvalue path=INDI:BURI:SOUR notpresent="true"></font>
</table>
<table>
<font color=green><mark ifvalue path=INDI:CREM:SOUR></font>
<font color=red><mark ifvalue path=INDI:CREM:SOUR notpresent="true"></font>
</table>
</td>
</tr>

Regards,
Pedro

Offline Zurga

  • VIP
  • Supernatural Member
  • *
  • Posts: 4 410
    • View Profile
Re: Individual templates question
« Reply #2 on: July 23, 2024, 18:50:38 »
Either you use mark, either you use prop or ifvalue (prop or ifvalue does exactly the same thing).
You can't merge the two so change :
<mark ifvalue path=INDI:BURI:SOUR>
for <mark path=INDI:BURI:SOUR>

In the first template : <mark <ifvalue path=INDI:BURI:SOUR default INDI:CREM:SOUR>> is impossible
It is just : <mark path=INDI:BURI:SOUR default INDI:CREM:SOUR>

Zurga

Offline pmralbuquerque

  • VIP
  • Full Member
  • *
  • Posts: 24
    • View Profile
Re: Individual templates question
« Reply #3 on: July 24, 2024, 04:07:00 »
Thank you Zurga, I'll try this.

Offline pmralbuquerque

  • VIP
  • Full Member
  • *
  • Posts: 24
    • View Profile
Re: Individual templates question
« Reply #4 on: July 26, 2024, 16:27:30 »
OK, this is the working code to present either BURI or CREM, as existing. Thank you Zurga, for helping. Hope it pleases somebody:
Code: [Select]
<body bgcolor=#45494A>
<table border="0" width=100% bgcolor=#45494A color=black>
<tr valign="top">
<td width=0>
<media max=25>
</td>
<td>
<table border="3" width=100% bgcolor=#45494A font color=#F0F0F0>
<tr>
<td width=10>
<prop path=INDI:SEX img=yes txt=no>
</td>
<td>
<table width=100%>
<tr>
<td valign="top">
<font color="blue"><b><prop path=INDI></b></font>&nbsp;
<prop path=INDI:NAME:GIVN max=60><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><prop path=INDI:NAME:SURN max=30></b>
</td>
<td align="right">
<font color=red><b><prop path=INDI:_SOSADABOVILLE></b></font>&nbsp;
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<prop path=INDI:BIRT img=yes txt=no>
</td>
<td valign="top">
<b><prop path=INDI:BIRT format="{$D}"></b>&nbsp;<br>
<prop path=INDI:BIRT:PLAC:NOTE max=60>&nbsp;
</td>
<td width=0>
<table>
<font color=green><mark path=INDI:BIRT:SOUR></font>
<font color=red><mark path=INDI:BIRT:SOUR notpresent="true"></font>
</table>
</td>
</tr>
<tr>
<td>
<prop path=INDI:CHR img=yes txt=no>
</td>
<td valign="top">
<b><prop path=INDI:CHR format="{$D}"></b>&nbsp;<br>
<prop path=INDI:CHR:PLAC:NOTE max=67>&nbsp;
</td>
<td width=0>
<table>
<font color=green><mark path=INDI:CHR:SOUR></font>
<font color=red><mark path=INDI:CHR:SOUR notpresent="true"></font>
</table>
</td>
</tr>
<tr>
<td>
<prop path=INDI:DEAT img=yes txt=no>
</td>
<td valign="top">
<b><prop path=INDI:DEAT:DATE></b>&nbsp;-&nbsp;<prop path=INDI:DEAT:CAUS max="50"><br>
<prop path=INDI:DEAT:PLAC:NOTE max=67>&nbsp;
</td>
<td width=0>
<table>
<font color=green><mark path=INDI:DEAT:SOUR></font>
<font color=red><mark path=INDI:DEAT:SOUR notpresent="true"></font>
</table>
</td>
</tr>
<tr>
<td>
<ifvalue path=INDI:BURI img=yes txt=no>
<ifvalue path=INDI:CREM img=yes txt=no>
</td>
<td valign="top">
<b><ifvalue path=INDI:BURI:DATE default=INDI:CREM:DATE></b>&nbsp;
<br />
<ifvalue path=INDI:BURI:PLAC:NOTE default=INDI:CREM:PLAC:NOTE max=60>&nbsp;
</td>
<td valign="top">
<table>
<font color=green><mark ifvalue path=INDI:BURI:SOUR></font>

<font color=red><mark ifvalue path=INDI:BURI:SOUR notpresent="true"></font>
    <table>
<font color=green><mark ifvalue path=INDI:CREM:SOUR></font>
<font color=red><mark ifvalue path=INDI:CREM:SOUR notpresent="true"></font>
</table>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>