My panel: eliminate a line, if empty

Started by sinus, November 03, 2025, 10:56:00 AM

Previous topic - Next topic

sinus

Just to be sure, not a real problem, I guess, with html we can achieve this.

To eliminate a line like the second line with the yellow text, IF the value is empty, this is not possible in "my panel"?

Because if I use this command (from the help)
-row={File.MD.description|prefix:<span style="font-size:150%~;">;postfix:</span>}
or simply
-row={File.MD.description}

then this works, but it works not fully, if you have a text before the value, like here "Shown Ort$$:3", like
row=Shown Ort$$:3<span style="font-size: 120%; color: yellow;">{File.MD.XMP::iptcExt\LocationShownCity\LocationShownCity\0} - {File.MD.XMP::iptcExt\LocationShownProvinceState\LocationShownProvinceState\0|pereplace:Kanton==Kt.} - {File.MD.XMP::iptcExt\LocationShownCountryName\LocationShownCountryName\0}</span>
Because the explanations-value (Shown Ort) is not eliminated, hence the line is there.
I can use the variable, prefix, but then the font is the same, but usually I want the first "explanation" grey and the second bigger and maybe with a color.
Best wishes from Switzerland! :-)
Markus

Mario

Quotethen this works, but it works not fully, if you have a text before the value, like here "Shown Ort$$:3", like
Yes. -row= works only when there is no text on the right side of the =.
If you have text outside the variable, you must use postfix and prefix, as explained in this section of the Overlay help topic:

Handling Empty Tag Values and Using prefix and postfix

sinus

#2
Thanks, Mario!  :)

I understand, everything is ok.

Just now realised: it works really! :-)
Great, what we can do.
That's it, what I wanted:

-row={File.MD.PLUS::XMP\Custom2\Custom2\0|hasvalue:Alter damals}$$:3<span style="font-size: 120%; color: yellow;">{File.MD.PLUS::XMP\Custom2\Custom2\0}

Best wishes from Switzerland! :-)
Markus

Mario

Have a look at -rowne= Preventing Escaping with rowne
Keep in mind that variables by default escape (replace) certain characters like > or <, which might mess up your HTML formatting. postfix and prefix are usually better.