So I did a posting a few weeks back with this same problem and I was trying to solve the problem with PHx in conjunction with Ditto, but it didn’t work.
I’m running on MODx 0.9.6, Ditto 2.0.2, PHx 2.1.2
What I’m trying to do is just have Ditto change the TPL based, in my case not having a picture vs. having one, on certain criteria. I’m building a website for a client which has an endorsement section. Sometimes there is a picture for people giving the endorsement, sometimes not. For the endorsement page I’m calling Ditto like so:
[[Ditto? &startID=`55` &tpl=`endorsementpicTPL` &summarize=`50` &sortDir=`DESC` &sortBy=`pub_date` &depth=`1` ]]
Here’s a test page (not actually a live MODx page, but just coded so I can explain what I’m trying to accomplish)...as you’ll be able to see from the example, when there’s a picture, it obviously shows up and when no picture, I want a different background and more room for text:
http://lumpkinforcongress.com/t_endorsements_pic.html
Here is my original post when I was trying to use PHx to solve the problem:
http://modxcms.com/forums/index.php/topic,17699.msg111378.html#msg111378
It’s a bit lengthy, but after following the advice given from others, I couldn’t get it to work.
Anybody have any experience with having changing the TPL on a Ditto call?