![]() |
|
getAlbumLinkURL() links to page 2 if there's a sub album - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: getAlbumLinkURL() links to page 2 if there's a sub album (/thread-7127.html) |
getAlbumLinkURL() links to page 2 if there's a sub album - rjscotland - 2010-06-01 Hi, I'm in the process of cobbling together quite a custom Zenphoto theme for my website. The way it functions isn't quite like your traditional gallery in that there's no need or place for navigation crumbs. Because of this, when viewing an image, a link back up to the containing album is required. Along comes getAlbumLinkURL().
The problem I'm having is that when I have an album with both images and sub albums in it, for some reason the images always start on page 2. On the album page I'm using the following, so it gets round the issue by specifying that 12 image thumbnails are allowed to share the first page with sub albums: ` ` My current work around is just to omit the getAlbumLinkURL() and just link to "." as it's better ending up on the first page at least. Of course, it would be nice to restore the functionality where clicking the link brings you to the album page the image is on. Sorry for the long post but I felt if I explain everything in detail it'll avoid me having to clarify later on. getAlbumLinkURL() links to page 2 if there's a sub album - acrylian - 2010-06-01 I am not sure I really understand. Normally the getAlbumLinkURL() links to the page you came from. But your real problem lies in the sharing of image thumbs and thumbs of sub albums. We have a function that "equals" the look if both appear together. Please search the documentation for "normalizColumns". getAlbumLinkURL() links to page 2 if there's a sub album - rjscotland - 2010-06-01 Yeah, and in this case I'm coming from page 1 and it's linking to page 2. My "Thumbnails per page" option is also set to 12, and everything works fine until I add a sub album. Example: I go to page 1 of an album, eg http://domain.tld/new-album-1. I click on an image thumbnail. On the image.php page my getAlbumLinkURL() links to http://domain.tld/new-album-1/page/2 instead, even though the image is not on page 2. If I remove the 12 in next_image(false, 12) in the album.php, page 1 only has the sub albums on it, the images then start on page 2. This then matches with what getAlbumLinkURL() is doing. So, the ,12 seems to make a "pretend" page 1 for the images. The gallery system still thinks the images start on page 2. I need to correct whatever the underlying reason is for the images starting on page 2. Unfortunately due to the layout, normalizeColumns() is not any use to me, but thanks for the suggestion! getAlbumLinkURL() links to page 2 if there's a sub album - acrylian - 2010-06-01 You probably should read the documentation more carefully. You will find: Since you also have albums, you of course have to set the same for the Not knowing your theme at all I referred to getAlbumLinkURL() links to page 2 if there's a sub album - rjscotland - 2010-06-01 Thanks for the reply acrylian. The thing is, I do actually want pagination! Here's the album view, page 1: And here's page 2: Here's the image view: The red circle shows my link back to the album. The above is how I'm wanting it to display. The problem is that the link which I've circled in the image view goes to page 2. This only happens if I have sub albums. I hope that this is clearer! Cheers getAlbumLinkURL() links to page 2 if there's a sub album - acrylian - 2010-06-01 I guess then it might again come down to the "normalizeColumns()" function usage again. You have to have that calculate the 2nd parameter (the firstpageimages) otherwise the sytems is confused. getAlbumLinkURL() links to page 2 if there's a sub album - rjscotland - 2010-06-01 Ok, I'll have a play about with it, thanks. getAlbumLinkURL() links to page 2 if there's a sub album - rjscotland - 2010-06-01 Turned out all I needed to do to fix it (and another issue where I was ending up on "page 3 of 2" so to speak) was set on each page: ` ` Thanks for your input! getAlbumLinkURL() links to page 2 if there's a sub album - rjscotland - 2010-06-01 Ok, the above had issues... Here's my final fix: ` ` getAlbumLinkURL() links to page 2 if there's a sub album - rjscotland - 2010-06-01 ` ` getAlbumLinkURL() links to page 2 if there's a sub album - acrylian - 2010-06-02 Good that you solved it for your purpose. Zenphoto is quite flexible as you see,even if moving out of the "standard way" might cause some experimentation..;-) getAlbumLinkURL() links to page 2 if there's a sub album - rjscotland - 2010-07-04 Hi again - sorry for dragging this up but I felt I should keep it up to date in case for some reason someone benefits from this. As I've been developing my theme I ran into issues with the above. It breaks if there is no sub albums. This is how I have it now in album.php: ` ` ` ` |