"Breadcrumbs" for Dynamic Albums

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.

Comments

  • acrylian Administrator, Developer
    edited September 2021

    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.

  • 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.

  • acrylian Administrator, Developer
    edited November 2021

    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(); 
    
  • 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.

Sign In or Register to comment.