Page 1 of 1

[Solved] Start PrettyPhoto Gallery from one single image

Posted: Wed Jan 23, 2013 12:05 pm
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

Re: Start PrettyPhoto Gallery from one single image

Posted: Wed Jan 23, 2013 1:22 pm
by Jos
Check the FAQ section of http://wiki.cmsms.nl/index.php/Gallery for "How to have one thumbnail and the rest hidden"

Re: Start PrettyPhoto Gallery from one single image

Posted: Wed Jan 23, 2013 2:00 pm
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