I played a bit around and met anew a wellknown trap with Ditto:
It wants to have a placeholder or TV in its template, otherwise the output will be empty.
The problem is: having the TV within a phx placeholder, that wouldn’t help. The TV has to occur outside of the phx construct.
So I found confirmed that this would not work:
[+phx:if=`[+showDate+]`:is=`1`:then=`[+date+]`+]<br/>
because there the TV is only occuring within the phx placeholder.
On the other hand, the following works like expected, because the TV is also present unmodified:
[+showDate+][+phx:if=`[+showDate+]`:is=`1`:then=`[+date+]`+]<br/>
Fortunately I found a trick to get rid of the unwanted output of [tt][+showDate+][/tt] at the beginning - we simply modify it to an empty string:
[+showDate:len:gt=`0`:then=``+][+phx:if=`[+showDate+]`:is=`1`:then=`[+date+]`+]<br/>
That does it! This is strange enough since now again the TV does not occur unmodified...
Additional observation: Using the short version
[+showDate:is=`1`:then=`[+date+]`+]<br/>
instead of
[+phx:if=`[+showDate+]`:is=`1`:then=`[+date+]`+]<br/>
will never result in the wanted output.
And a remark: Using [tt][*showDate*][/tt] would refer to the value of the TV for the document which contains the Ditto call - normally the one given in the [tt]&parents[/tt] parameter. That may have sense if you want to control an equal behaviour of all its child documents through just one value.