New Page on Thumbnail click
largelylivin
Registered Users Posts: 561 Major grins
I've created a gallery of dummy business cards that I am showing as an allthumbs gallery style. http://smile-123.smugmug.com/gallery/3551211
I need to be able to bring-up a vendors homepage when a thumbnail is clicked on. Initially I thought I could use a gallery style redirect, but I think I would need to rewrite the redirect JS to use /photo instead of /gallery, and also figure out how to include a target parameter.
Is this a good approach? Suggestions?
I need to be able to bring-up a vendors homepage when a thumbnail is clicked on. Initially I thought I could use a gallery style redirect, but I think I would need to rewrite the redirect JS to use /photo instead of /gallery, and also figure out how to include a target parameter.
Is this a good approach? Suggestions?
Brad Newby
http://blue-dog.smugmug.com
http://smile-123.smugmug.com
http://vintage-photos.blogspot.com/
Canon 7D, 100-400L, Mongoose 3.5, hoping for a 500L real soon.
http://blue-dog.smugmug.com
http://smile-123.smugmug.com
http://vintage-photos.blogspot.com/
Canon 7D, 100-400L, Mongoose 3.5, hoping for a 500L real soon.
0
Comments
Rather than a gallery style redirect, it's probably easier to just write some JavaScript that changes the links in the thumbs on this page.
Conceptually, the JavaScript would do the following:
- Check to see if the script is running on the page that you want it to be active on
- Iterate through all the thumb images on the page (you can use the div of #photos as a container to iterate and look for A links with a class of "photo")
- For each thumb link you find, parse the imageID out of the link and look it up in your own JavaScript table to get the URL of that customer's home page
- Change the href on the URL to point to the customer's home page
You would then, at this point, have a page where clicking every image took you directly to that customer's home page. To add a new customer to the page, you'd add their image to the gallery and that gallery ID and their home page URL to your JavaScript table.Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
It uses a table to show both thumbs and a caption, with links from both (or either) to pages that could be within smugmug or to an outside site.
--- Denise
Musings & ramblings at https://denisegoldberg.blogspot.com