Link to image inside Dynamic Album

I made a dynamic album, and I want to be able to link to an image that is in the dynamic album, and have the user remain in that album, rather than to that image's regular Static Album.

I see that this is mentioned briefly at the end of the "How to use Dynamic Albums" article under the section "Setting up the dynamic album context manually"

There is a code block given:
`


<?php<br />
$firstimage = $_zp_current_album->getImage(0);

$firstimagealb = $firstimage->getAlbum();

zp_load_image($firstimagealb->name,$firstimage->filename);

prepareImagePage();

?>

`
but I am not sure which template file to add it to, or where. If I add it to the album template, will it affect how the static albums work?

Comments

  • acrylian Administrator, Developer
    In Zenphoto 1.4.6 the url of an image of an dynamic album is actually already linkable. Since it contains the dynamic album name and not the one of the real static album. Otherwise you would have to do the `zp_load_album` part before your cited code as well.
  • Thanks for the reply: I updated ZenPhoto, and sure enough, I can now link to images inside the Dynamic Album. I have one other question about working with Dynamic Albums: In the ZenPhoto back end, is there any way to edit images (descriptions, titles, dates, etc) from the Dynamic Album? The "Images" tab isn't there when I go to the Dynamic Album - only in Static Albums. It would be nice to be able to have access for to all the images in a Dynamic Album rather than hunting for each image across all the other albums.

    If its not possible, and there is no plugin for this, I guess consider this a feature request?

    Thanks!
  • acrylian Administrator, Developer
    You cannot edit images of a dynamic album because it does not really have images. You can open a feature request ticket on the bug tracker but as always no guarantee when or if we add it.
  • Hm, I was afraid that might be the case.
  • acrylian Administrator, Developer
    It is surely possible to add that. We can put it on our list for the next major release if we manage it for it.
Sign In or Register to comment.