Plugin Author
berkux
(@berkux)
Hi,
I’m not sure what is your challenge.
If {..} is empty, nothing is displayed.
Try this:
[jsoncontentimporter url=http://wptest.kux.de/extra/celin007.php]
date1: {date1} – {date1:ifNotEmptyAddRight:extratext1}<br>
date2: {date2} – {date2:ifNotEmptyAddRight:extratext2}<br>
date3: {date3} – {date3:ifNotEmptyAddRight:extratext3}<br>
date4: {date4} – {date4:ifNotEmptyAddRight:extratext4}<br>
[/jsoncontentimporter]
Bernhard
Hi Bernhard,
Thanks for the quick response.
Imagine the variable date has value 2/3/2020
The variable {date} will have value for a time period (for example from 1/3/2020 to 20/3/2020). All other times the value will be null.
Input – {date:ifNotEmptyAddRight} output is empty
Input – {date:ifNotEmptyAddRight:{date}} output shows 2/3/2020 2/3/2020 (displays twice)
I want to display just the date not any text in front or after it.
Is it possible to display just the date if not null?
Thanks for all your help.
Kind Regards
Celin
-
This reply was modified 6 years, 3 months ago by
celin007.
Plugin Author
berkux
(@berkux)
Hi Celin,
why is just using {date} not enough?
Bernhard
Thanks Bernhard. You are a genius, I didn’t think that way.
Regards
Celin