Getting FS_LIST image data from ContentSelect query
Author: damon_s
Publication Date: 3/9/2018 18:13
Hello all-
I have a ContentSelect query that returns data by year. I am able to use a $CMS_FOR loop to get almost everything I need; each dataset's headline, date and the first image from a FS_LIST are successfully rendered like:
$CMS_FOR(entry, fr_reports)$
<div>
<img src="$CMS_VALUE(entry.image_gallery[0])$"/>
<h4>$CMS_VALUE(entry.headline)$</h4>
<h5>$CMS_VALUE(entry.date)$</h5>
</div>
$CMS_END_FOR$
My issue is applying an image resolution to the image (what's returned above is the raw, full sized image). Usually, for my basic templates I'd have something like $CMS_REF( st_image, res: "width800" )$. I'm unsure on how to do the same inside my loop.
-
Author: damon_s - 3/13/2018 20:19
Going through other templates I noticed my references to my FS_CATALOGS and FS_LISTS items had the image element form name attached to the end. This ended up working for me:
<img src="$CMS_REF(entry.image_gallery[0].st_image, res: "w800")$"/>
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
1 commentaire