Can some one help me please. I am trying to get a one image url from content or a variable. I have put notag and its still giving me a img tag. What am I doing worng,
output I would like http://site.com/picture.jpg
{cgsi_getimages imagesonly='1' notag='1' }{content}{/cgsi_getimages}
Thank you.
cgsi_getimages get image url
-
andrewvideouk
- Forum Members

- Posts: 156
- Joined: Thu Aug 20, 2020 10:49 pm
Re: cgsi_getimages get image url
To get anything other than the tags you need to assign it:
Then you can cycle through the $imageinfo array:
or access an image directly, 0 being the first, e.g.:
Code: Select all
{cgsi_getimages assign='imageinfo' nocontent=1}{$content}{/cgsi_getimages}
Code: Select all
{foreach from=$imageinfo item=image}
{$image.src}
{/foreach}Code: Select all
{CGSmartImage src=$imageinfo[0].src noembed=1 max_width=640}Not getting the answer you need? CMSMS support options
-
andrewvideouk
- Forum Members

- Posts: 156
- Joined: Thu Aug 20, 2020 10:49 pm
Re: cgsi_getimages get image url
Thank you very much you are a life saver. I give it a try.

