First let me say that overall I love MODx. I use it because it stays out of my way and has the right balance of straightforwardness and power for rapid web design.
That being said, I’m in a wild goose chase right now, and I can’t find a way out.
I’ve been searching for days on how to resize image TVs. I have a section of a site where I need to attach an image to a bunch of documents. I would rather do this programmatically, with an image TV, than just dropping them in the page with TinyMCE. The images may be different sizes when they come in. I’d like to specify their size in the page template (e.g. 300px wide), and I want a "list" page using Ditto to list all the documents with a thumbnail image.
So I made up a Ditto call in the "list" page that worked, but it was using Ditto’s default template. I planned to find an image resizing solution and then roll it into a Ditto template.
So I Googled and came up with ImageTVPreview, which has absolutely no documentation, and try as I might, I couldn’t come up with how it worked.
After more Googling I found phpThumb. I found the "modified" version for MODx and installed it. Realizing that now I have to have a Ditto template in order to use it, I Google for help on Ditto templates.
I found
http://ditto.modxcms.com/tutorials/creating-a-custom-template.html - this document shows me a "default" Ditto template:
<div class="ditto_item" id="ditto_item_[+id+]">
<h3 class="ditto_pageTitle"><a href="[~[+id+]~]">[+pagetitle+]</a></h3>
<div class="ditto_documentInfo">by <strong>[+author+]</strong> on [+date+]</div>
<div class="ditto_introText">[+introtext+]</div>
</div>
I pasted this into a chunk called "albumList," figuring I’d try this to see if it works and modify it from there. I changed my Ditto call from [!Ditto? &startid=’18’&showPublishedOnly=0 !] to [!Ditto? &startid=’18’&showPublishedOnly=0&tpl=’albumList’ !]. Now for each document in the list, it says "&tpl either does not contain any placeholders or is an invalid chunk name, code block, or filename. Please check it."
Back to Google. Most of the results are just MODx sites returning the same error. What little else I could find said that it’s because I’m not putting TV names in the template. So I changed the template to contain nothing but the TV name. Same error.
I’m stuck. I had hoped this would be something so simple that it had been done a thousand times. I need help, I’m losing faith in MODx!