Hi,
i have a ditto call like this:
[!Ditto?&parents=`14`&filter=`prodotti-associati-2,[*RICONOSCITORE*],7`!]` and i want that when the output is `No documents found.` no display.
I have tried this PHx call but not work...
[+phx:if=`[!Ditto?&parents=`14`&filter=`prodotti-associati-2,[*RICONOSCITORE*],7`!]`:is=`No documents found.`:then=``:else=`......`+]
Any helps?
thx
[ed. note: fabryshock last edited this post 15 years, 1 month ago.]
"Destiny is not a matter of chance, it's a matter of choice"
Haven't used Ditto for ages, but I think you can just use &noResults=``
thanks Lucas, I did not know "&noResult" interesting and very helpful.
Unfortunately I need to use PHX in this project...
"Destiny is not a matter of chance, it's a matter of choice"
I have to make sure that if I have results I will display a title (<h3> title </h3>) and a list of products, while if the result is 0 should not see anything. The "&noResult" is ok, but I have to put the title only if the condition has occurred ...
This is my code:
[+phx:if=`[!Ditto?&parents=`14`&filter=`prodotti-associati-2,[*RICONOSCITORE*],7`&noResults=` `!]`:is=` `:then=``:else=`<h3>{{label-accessori-(yams_id)}}</h3>`+] ---> NOT WORK, EVER DISPLAY THE TITLE
[!Ditto?&parents=`14`&tpl=`lista-accessori`&filter=`prodotti-associati-2,[*RICONOSCITORE*],7`&extenders=`@FILE assets/modules/yams/yams.extender.inc.php`&id=`(yams_id)` &language=`(yams_mname)`&phx=`0`&noResults=` `!]
[ed. note: fabryshock last edited this post 15 years, 1 month ago.]
"Destiny is not a matter of chance, it's a matter of choice"
&tplFirst is your friend.
Duplicate your lista-accessori tpl and add the <h3> tags and use it as the tplFirst
If there are no results then nothing is shown, if there are the first result has the <h3> tags, the rest don't
Many many thx Eoler and bunk58 , I did not know these commands, very useful!!!!!
"Destiny is not a matter of chance, it's a matter of choice"