Page 1 of 1
Catalog - Image name Variable ?
Posted: Mon Dec 15, 2008 8:42 pm
by fgrace
Hi,
I'm new to CMSMS, I'm having a problem on my gallery page.
I'm attempting to add in some code that needs the image name e.g. "test.jpg" but I have tried all the image codes within an array e.g. "{$src_image_url_array}" but this keeps calling the absolute path with image name at the end.. I wish just to display the file name, how can I do this?
Re: Catalog - Image name Variable ?
Posted: Wed Dec 17, 2008 1:38 am
by fgrace
Any help on this one guys..have exhausted all resources at this stage..

Re: Catalog - Image name Variable ?
Posted: Wed Dec 17, 2008 2:47 am
by JeremyBASS
try
{assign var="foo" value=$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"}
{$foo}
that should do'er
read more here... and you can find more if you search...
have a great day
jeremyBass
Re: Catalog - Image name Variable ?
Posted: Wed Dec 17, 2008 11:31 pm
by fgrace
Hi Jeremy
My Catalog template contains the following code:
{if count($product_image_url_array) > 0}
{section name=ind loop=$product_image_url_array}
{/section}
{/if}
I'm trying to get the img src link just display the image filename
I have tried to implement you code in the template, but can't get it to work - do I need to input the code into the Cataloger.moduler.php page or where does it go in the template code?

please bare with me..
Re: Catalog - Image name Variable ?
Posted: Thu Dec 18, 2008 12:56 am
by JeremyBASS
I will bare with you but you need to do your readng first..
start here
http://forum.cmsmadesimple.org/index.ph ... #msg134463
http://forum.cmsmadesimple.org/index.ph ... #msg118506
both of those go over setting the src as you wish by breaking down the link and pulling the image src..
cheers...
jeremyBass