Thanks charliez and mrhaw for your suggestions.
@charliez: I’ll have a look at using PHx inside Ditto if I can’t find another solution, it’s certainly not something I was aware you could do.
@mrhaw: I’m fairly new to modx so I’ll have to look at how to use TV with a select binding. I’ve posted my full (horrendous) PHx call below:
[+phx:if=`[!Ditto? &parents=`21` &tpl=`ditto_articles` &filter=`longtitle,[*longtitle*],7|id,[*id*],2` &orderBy=`published_year ASC`!]`:is=``:then=``:else=`<tr><td class="lf_td">Books:</td><td class="rt_td">[!Ditto? &parents=`21` &tpl=`ditto_articles` &filter=`longtitle,[*longtitle*],7|id,[*id*],2` &orderBy=`published_year ASC`!]</td></tr>`+]
In my simplified code in my first post I was just outputting ’no results’ or ’results’, but what I’m trying to output is a table row and list, could using a TV with a select binding achieve this?