[solved] Cataloger Image Array - Exclude First Image

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
buffalokill
New Member
New Member
Posts: 5
Joined: Wed May 21, 2008 6:02 pm

[solved] Cataloger Image Array - Exclude First Image

Post by buffalokill »

Hi Guys,

In the Cataloger module, I am using this template as my Item-CSS-Based Template:

Code: Select all


<a href="{$src_image_1_url}" title="{$title}"><img src="{$image_1_url}" alt="{$title}" /></a>


<div class="item_thumbnails">

{section name=ind loop=$image_url_array}
<a href="{$src_image_url_array[ind]}" title="{$title}"><img src="{$image_thumb_url_array[ind]}" /></a>
{/section}

</div>


As you can see, I'm showing off a large image on top by calling $image_1_url, and then listing the thumbnails as an array below.

The problem with this, is that it shows $image_1_url twice. The main large image, and then the first image in the array.

My Question:

Is there a way to exclude $image_1_url from the loop=$image_url_array?

I'm no programmer, but I am guessing it will call for some modifications to /modules/Cataloger/action.default.php  :(

Any help is much appreciated. Thanks guys.
Last edited by buffalokill on Wed May 21, 2008 10:49 pm, edited 1 time in total.
buffalokill
New Member
New Member
Posts: 5
Joined: Wed May 21, 2008 6:02 pm

Re: Cataloger Image Array - Exclude First Image

Post by buffalokill »

w00t!  Got it. After researching Smarty's site http://www.smarty.net/manual/en/languag ... ection.php

I found that you can start a loop at which ever integer you want.

This was my solution.

Code: Select all

{section name=ind loop=$image_url_array [b]start=1[/b]}

<span class="item_thumb_small">
<a href="{$src_image_url_array[ind]}" title="{$title}"><img src="{$image_thumb_url_array[ind]}" /></a>
</span>

{/section}

So, adding start=1 to the {section}, has it skip the first image.
Post Reply

Return to “Modules/Add-Ons”