Member
Member
Nick7635   2021-09-19, 20:36
#1

How can I find a breadcrumb-style trail so I can track an image in a Dynamic Album back to the location of the real image? I am asking because I want to remove an image from a Dynamic Album, and to do so I need to remove the tag with the image that places it in the Dynamic Album.
I would help to have a "Dynamic Images" tab on the Dynamic Album screen.

Administrator
Administrator
acrylian   2021-09-20, 06:20
#2

Dynamic albums are searches, there is no images tab for a reason as it could be very huge depending on the search.

am asking because I want to remove an image from a Dynamic Album, and to do so I need to remove the tag with the image that places it in the Dynamic Album.

I don't understand, if you know the tag that performs the search you know already what to remove.

You have to find this programmatically via the object model:
https://www.zenphoto.org/news/zenphotos-object-model-framework/

On the theme image.php page use the global variable for the current image object and use use the method getAlbum() to get the real album of the image. The object property $albumnamealbum stoes the dynamic album.

Additionally you can still edit the image itself on the image.php page within dynamic album context via the admin toolbox to remove the tag performing the search.

Member
Member
Nick7635   2021-11-23, 21:00
#3

I'm still struggling, I'm afraid. I have an image produced as a result of a search, and just want to know which real album it is in.

Administrator
Administrator
acrylian   2021-11-23, 21:50
#4

You have to edit your theme where that image is displayed - most likely the next_image loop of the theme's search.php theme page - and use the object model as described above.

So within that loop the current image is in the usual global and you can get the title of the image's album like this:

  $albumobj  = $_zp_current_image->getAlbum();
  echo $albumobj->getTitle(); 
Member
Member
sbillard   2021-11-23, 21:59
#5

We don't provide an admin toolbox link to edit or delete an image when you got to it via a dynamic album. This is to prevent someone from making the mistake of [for instance] deleting the image thinking that would only remove it from the dynamic album, not the real album.

You can link to the admin edit for the dynamic album from the page. On that page you will see the search criteria that populates the dynamic album. You can use that information to do a plain search which will give you the same results as the dynamic album. Select the image and go to the admin edit page for it via the admin toolbox.

From there do what you need to prevent the image from being found by the search criteria of the dynamic album.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.