[Solved] Start PrettyPhoto Gallery from one single image

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
hinti
Forum Members
Forum Members
Posts: 30
Joined: Wed Feb 08, 2006 2:00 pm

[Solved] Start PrettyPhoto Gallery from one single image

Post by hinti »

Hi Guys,

I need some help:

i've read a lot about PrettyPhoto Plugin, and i was looking here in the forum, but i haevent found any good answer.

I need to strart a gallery from one single image.
Normally, we have an overview (group) of all images, on click, it opens the container with the gallery.

I want to start the Gallery from a link. The Gallery should start without an overview of all pictures.

How can I do this?

I think i have to change this code:

Code: Select all

{foreach from=$images item=image}
        <div class="img">
        {if $image->isdir}
                <a href="{$image->file}" title="{$image->titlename}"><img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a><br />
                {$image->titlename}
        {else}
   <a class="group" href="{$image->file|escape:'url'|replace:'%2F':'/'}" title="{$image->comment}" rel="prettyPhoto[{$galleryid}]"><img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a>
        {/if}
        </div>
{/foreach}
Have someone an idea?

Thanks for helping...

Hinti
Last edited by hinti on Wed Jan 23, 2013 2:03 pm, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Start PrettyPhoto Gallery from one single image

Post by Jos »

Check the FAQ section of http://wiki.cmsms.nl/index.php/Gallery for "How to have one thumbnail and the rest hidden"
hinti
Forum Members
Forum Members
Posts: 30
Joined: Wed Feb 08, 2006 2:00 pm

Re: Start PrettyPhoto Gallery from one single image

Post by hinti »

Thank you!!!! Problem Solved....
;D ;D ;D ;D ;D ;D ;D ;D

I changed the code to this:

Code: Select all

{assign var='firstimage' value='1'}
{foreach from=$images item=image}
   <div class="img">
   {if $image->isdir}
      <a href="{$image->file}" title="{$image->title}"><img src="{$image->thumb}" alt="{$image->title}" /></a><br />
      {$image->title}
   {elseif $firstimage}
   <a href="{$image->file}" title="{$image->title}" rel="prettyPhoto[{$galleryid}]"><img src="{$image->thumb}" alt="{$image->title}" /></a>
   {assign var='firstimage' value='0'}
   {else}
   <a href="{$image->file}" title="{$image->title}" rel="prettyPhoto[{$galleryid}]">{* no thumb here *}</a>
   {/if}
   </div>
{/foreach}
<div class="galleryclear">&nbsp;</div>


Thank you Jos for writing so fast.
Thanks to all helpers out there.
Hopefully this will help also others.

Bye
Post Reply

Return to “Modules/Add-Ons”