How do I retreive the ID of the top album?

Does anyone know if there is a way I can retrieve the 'ID' or 'name' of the 'top' album ONLY to be used on the image.php page?, so for example if I had something like

AlbumOne
> SubAlbumOneA
> SubAlbumOneB
> > SubSubAlbumOneBA
> > > ImageOne < so I want to get the ID of AlbumOne
> > > ImageTwo < so I want to get the ID of AlbumOne
> > SubSubAlbumOneBB

AlbumTwo
> SubAlbumTwoA
> > SubSubAlbumTwoAA
> > SubSubAlbumTwoAB
> > > ImageThree < so I want to get the ID of AlbumTwo
> SubAlbumTwoB

AlbumThree
> SubAlbumThreeA
> SubAlbumThreeB
> > ImageFour < so I want to get the ID of AlbumThree
> SubAlbumThreeC
> > SubSubAlbumThreeCA
> > SubSubAlbumThreeCB

Thanks for your help

GW

Comments

  • `
    $album = getUrAlbum($_zp_current_album);
    $id = $abum->getID();
    `
  • Thanks, I have not tried it yet but it would appear that will give me the album ID of the immediate parent for the image? I was looking for the ID for the images TOP parent Album.

    Thanks

    GW
  • Well, you asked for the TOP parent. Maybe you should try this instead of speculating.
  • Sorry, my apologies, you are correct and again I do apologise for my comment :)

    Thanks

    GW
Sign In or Register to comment.