ZenphotoCMS Forum
Adding a variable to each link in Zen Photo - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: Adding a variable to each link in Zen Photo (/thread-919.html)



Adding a variable to each link in Zen Photo - moconn - 2006-11-28

Hi there,

I need to add an id to each link in Zen Photo.

For example, currently if i am here: http://www.blastbeat.org/mmcs/photos/criminalrecords/
and i click on the first album I need to go to something like:

http://www.blastbeat.org/mmcs/photos/criminalrecords/albumname/index.php@id=1

That way i can grab the ID and make sure the links in the header still work..

Any help greatly appreciated..




Adding a variable to each link in Zen Photo - trisweb - 2006-11-29

You'll need to update the link-creating functions, in template-functions.php. Do a search for 'printLink' to find them.

Alternatively, you could add your id to [i]every[/i] link, using the printLink function, but you'll also have to look through your theme for links that use the getXxxx() functions, and add the id manually.

Extra GET parameters (ex: albumname/index.php?id=1) will not affect zenphoto as long as they don't conflict with zenphoto's own (image, album, and page). Use them as you like!




Adding a variable to each link in Zen Photo - moconn - 2007-01-23

Great, thanks for your help :)