Catalog - Image name Variable ?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
fgrace
Forum Members
Forum Members
Posts: 15
Joined: Mon Dec 15, 2008 8:35 pm

Catalog - Image name Variable ?

Post 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?
fgrace
Forum Members
Forum Members
Posts: 15
Joined: Mon Dec 15, 2008 8:35 pm

Re: Catalog - Image name Variable ?

Post by fgrace »

Any help on this one guys..have exhausted all resources at this stage..  ???
JeremyBASS

Re: Catalog - Image name Variable ?

Post 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
fgrace
Forum Members
Forum Members
Posts: 15
Joined: Mon Dec 15, 2008 8:35 pm

Re: Catalog - Image name Variable ?

Post 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..
JeremyBASS

Re: Catalog - Image name Variable ?

Post 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
Post Reply

Return to “Modules/Add-Ons”