What is setting the [[+filename]] placeholder and the [[+id]] placeholder and [[+code]] placeholders?
category_id may not be in the $_GET array any more.
Can you retrieve it with xPDO (or hard-code it)?
Hi, thanks for your reply.
Everything works fine, except I no longer see a default image if I haven’t added an image to an item. I just see the alt tag.
This is since I updated to 2.1.1.
I have another identical site running 2.0.7 and it shows the default image if there are no images added an item.
In both sites I can see the image if I have added one.
I’m not sure what to suggest, there haven’t been any changes to the output modifiers since March (not sure when 2.0.7 came out). I believe this would work.
<img src="[[+filename:notempty=`uploads/thumbs/[[+id]]/[[+filename]]`]] [[+filename:empty=`uploads/images/noimage.gif`]]" alt="[[+code]]" />
I would probably do it with a snippet, however. Something like this:
<img src = "[[!SetImage? &fname=`[[!filename]]` &fid=`[[+id]] ]]" alt="[[+code]]" />
<?php
/* SetImage snippet */
return empty($fname) ? 'uploads/images/noimage.gif' : 'uploads/thumbs/' . $fid . '/' . $fname;