Our code (in a News summary template):
Code: Select all
{foreach from=$items item=entry name=foo}
{capture assign='category_page'}{$entry->category|replace:' ':'-'|lower}{/capture}
{assign var=loc value=$entry->file_location}
{assign var=img1 value=$entry->fields.image1->value}
{assign var=img2 value=$entry->fields.image2->value}
{assign var=img3 value=$entry->fields.image3->value}
{capture assign='num'}image{if $img3 !=''}{1|rand:3}{elseif $img2 !=''}{1|rand:2}{else}1{/if}{/capture}
{assign var=img value=$entry->fields.$num->value}
<div class="{if $smarty.foreach.foo.iteration % 4==0}sum_main_right{else}sum_main{/if}">
<a href="{$entry->link|regex_replace:'/returnid=[0-9]*/':"returnid=$category_page"}">
{CGSmartImage src="$loc/$img" filter_croptofit='225,140,tc' quality='100' noembed=1}
etc.
Code: Select all
<img src="http://ourdomain.nl/uploads/uploads/_CGSmartImage/IMG_2217-f33faa2fb22699bee5e5c99bde057d73.jpg" width="225" height="140" alt="IMG_2217-f33faa2fb22699bee5e5c99bde057d73.jpg"/>
We have other photo-sites on which we have not done the upgrade of the CGSmartImage module and there it outputs something like this:
Code: Select all
<img class="img-link" src="http://anotherdomain.nl/uploads/_CGSmartImage/IMG_1460-32610a890372c6b80821a00e6ec4f802.jpg" width="606" height="400" alt="IMG_1460-32610a890372c6b80821a00e6ec4f802.jpg"/>
What, if so, are we doing wrong en what can we do about it?
Because of the 'random image feature' embedding is not an option for us.
Thanks in advance.
Ron Hoenson
HGPDESiGN