Hi all,
in my first try of using EvoGallery I obviously have some misunderstanding and hope you can push me a bit into the right direction.
I did the follwing:
Into my ressource "Gallery" (id=7) I uploaded a bunch of image files, so now there exists a folder [tt]assets/galleries/7/[/tt] containing these files and a subfolder [tt]thumbs[/tt] with the corresponding thumb files.
In the template for "Gallery" I put this call of EvoGallery:
[[EvoGallery? &display=`images` &type=`simple-list` &itemTpl=`tpl_thumb`]]
The template [tt]tpl_thumb[/tt] is this:
<a class="thumb" href="[~15~]"><img src="[+thumbs_dir+][+filename+]" alt="[+title+]" title="[+title+]" /></a>
I get my thumbs like I want them, styled by the class [tt]thumb[/tt].
In the links the id=15 refers to a ressource "Photo page" I want to show the big images in; for it I use a special template containing the following EG call:
[[EvoGallery? &display=`single` &itemTpl=`tpl_foto`]]
Herein [tt]tpl_foto[/tt] is this chunk:
<img class="foto" src="[+images_dir+][+filename+]" alt="[+title+]" title="[+title+]" />
Because there is no [tt]&picId [/tt] parameter in the call, the output shows all the images of the gallery one after the other, styled as big images by the class [tt]foto[/tt].
If I write a fix [tt]&picId[/tt] into the EG call, for example:
[[EvoGallery? &display=`single` &picId=`44` &itemTpl=`tpl_foto`]]
only this single picture is shown - but of course always the same, independent of the thumb link which was clicked.
So my question is: What do I need to write into the [tt]&picId[/tt] parameter to get the image that corresponds to the clicked thumb? Must I add something in the link, like
<a class="thumb" href="[~15~]?picId=????">
That is, how do i transfer the picId of the clicked thumb into the "Photo page" (id=15)? In the EvoGallery Documentation I read:
The ’single’ mode allows you to display a single image provided that you know the ID of it in the database. Generally, this information is determined through a separate snippet instance in ’images’ mode before passing it on to another instance. By default, this mode looks for a ’picId’ variable via a standard PHP request variable.
Seeing the default value for [tt]&picId[/tt] in the parameter list I tried this:
[[EvoGallery? &display=`single` &picId=`$_REQUEST['picId']` &itemTpl=`tpl_foto`]]
But that didn’t work: No image is shown.
You see, I’m rather clueless in PHP.
And so I ask for your help.
Thank you in advance!
ottogal