Page 1 of 1

[SOLVED] ListItExtended Display images not link

Posted: Tue Aug 27, 2013 4:18 pm
by delve2013
I'm using ListItExtended and I've used it before but I don't have access to the site I used it on anymore. Can someone please show me how I display an uploaded image instead of the link to the image.

Thanks

Re: ListItExtended Display images not link

Posted: Tue Aug 27, 2013 6:15 pm
by velden
Example that also uses CGSmartImage

Code: Select all

{foreach from=$items item=item}
{CGSmartImage src=$item->afbeelding filter_resize='h,150' title=$item->title noembed=1}
{/foreach}
Without CGSmartImage:

Code: Select all

{foreach from=$items item=item}
<img src="{uploads_url}/{$item->afbeelding}" alt="" />
{/foreach}
where 'afbeelding' is the alias of the file field definition of course.

EDIT: improved first example. (Thanks Stikki)

Re: ListItExtended Display images not link

Posted: Wed Aug 28, 2013 12:35 pm
by delve2013
I've attempted to use both examples and they both kill the css on the page and the image cannot be found either.

Ok so I got it working, the path to the images was incorrect. This is what worked for me:

Code: Select all

{foreach from=$items item=item}
<img src="{uploads_url}/images{$item->carimg}" alt="" />
{/foreach}
Thanks for your help guys, it's appreciated.

Re: ListItExtended Display images not link

Posted: Wed Aug 28, 2013 12:43 pm
by velden
You really need to be a little more specific.

Post the template you use and the alias of the field definition you've created.

A link to the page would help too.

BTW, if you have a template that shows a working link to the image, how hard would it be to create an image of that?

<a href="this-is-what-youre-looking-for"> vs <img src="this-is-what-youre-looking-for" />