![]() |
|
How to jump to correct named anchor from index.php to image.php - 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: How to jump to correct named anchor from index.php to image.php (/thread-11755.html) |
How to jump to correct named anchor from index.php to image.php - LondonLight.org - 2014-04-17 To make the question clear I have to explain what my site structure is like. index.php has a box which shows the 5 newest images: image.php shows all images in the album:
(...)
" name="image_"> ` Please advise how to make it possible so that if I click on an image in index.php, I get taken not only to that image's album but also jump to that image's named anchor. Maybe instead of numbering images I could use their names in the javascript, so instead of #image_1, #image_2, #image3 it would be #carrots, #cabbage#, #kitteh, but I don't know how to get this list of names. How to jump to correct named anchor from index.php to image.php - acrylian - 2014-04-17 Zenphoto has by default a concept of album pages (album.php) with thumbs and/or subalbums and the single image page (image.php). There are functions available for all these. See the theming tutorial and the functions documentation. If you wish to leave the standard way you may have to write your own functions to achieve that. Note also that rss feeds point on these standard pages depending on the rss feeds so you might need fallbacks for direct image links. If you want to use anchors to jump to you have to place links containing that and matching IDs on the page to jump to. You get the name via the Note Zenphoot internally does not use the "mtime" for latest but the ID per discovery from the file system. You will get wrong lists if your image mtimes are not correct otherwise. You will hopefully understand that we neither can't teach you general web technique basics here nor help with too specific custom theme things. |